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-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

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
  • 727 views
  • 0 likes
  • 2 in conversation