Statistical Procedures

Programming the statistical procedures from SAS
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-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

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