BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
kewong
Obsidian | Level 7

Hi SAS community,

I was wondering if you guys can help me out with the correct approach in determining whether or not a time trend is statistically significant over time.

Lets say in year 2000, we had 100 cases with over population of 50,000 = 200/100,000 persons/year.

in year 2005, we had 75 cases with populatino of 60,000 = 125/100,000 persons/year.

in year 2010, we had 50 cases over a population of 75,000 = 66.67/100,000 persons/year.

How do I get the p value and determine whether it's statistically different?

Thanks in advance for all your help!

1 ACCEPTED SOLUTION

Accepted Solutions
1zmm
Quartz | Level 8

Another possibility is Poisson regression using PROC GENMOD,

   data test(keep=year case log_n);

       infile datalines;

       input year case n;

       log_n=log(n);

       output test;
   datalines;

   2000 100  50000

   2005   75   60000

   2010   50   75000

   ;

   run;

   proc genmod data=test;

       model case=year / dist=poisson link=log offset=log_n;

   run;

View solution in original post

3 REPLIES 3
PGStats
Opal | Level 21

You can test for a linear time trend (Cochran-Armitage Test for Trend) as follows :

data test(keep=year case n);
input year cases population;
case = "YES";
n = cases; output;
case = "NO";
n = population-cases; output;
datalines;
2000 100 50000
2005 75 60000
2010 50 75000
;

proc freq data=test;
weight n;
tables year*case / trend;
run;

PG

PG
PGStats
Opal | Level 21

Note : The numbers used for testing should reflect actual observations, not population estimates. - PG

PG
1zmm
Quartz | Level 8

Another possibility is Poisson regression using PROC GENMOD,

   data test(keep=year case log_n);

       infile datalines;

       input year case n;

       log_n=log(n);

       output test;
   datalines;

   2000 100  50000

   2005   75   60000

   2010   50   75000

   ;

   run;

   proc genmod data=test;

       model case=year / dist=poisson link=log offset=log_n;

   run;

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 8426 views
  • 3 likes
  • 3 in conversation