BookmarkSubscribeRSS Feed
lizzy28
Quartz | Level 8

Hi everyone, 

I have three year data with the same measurements per observation, and there are 4000-6000 observations in the data set of each year. The three-year data is not longitudinal as there are only five observations that are in the data of all the three years. Is it possible to run any trend analysis this case (rather than simple description)? The sample looks like below:

Year Year1 Year2 Year3
N 6,000 4,000 5,000

 

flag_Year1 flag_Year2 flag_Year3 N
1 0 0 3,000
1 0 1 1,500
1 1 0 1,495
1 1 1       5

 

Thank you!

Lizi

1 REPLY 1
jk123xyz
Fluorite | Level 6

The simple answer is just to make year (or time) a continuous independent variable.  You can code year as 1, 2 or 3.

 

proc reg; model outcome = year; run;

 

This will give you a slope for the trend across time.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 1 reply
  • 411 views
  • 0 likes
  • 2 in conversation