BookmarkSubscribeRSS Feed
EMB
Calcite | Level 5 EMB
Calcite | Level 5

Hello,

I wish to study trends in age over time in 3 large samples (>1000 individuals each) from the same population and get p for linear trend.

Samples are independent and data are available for 4 time periods separated by equal time-intervals.

Would the following be correct? Any other suggestion?

 

proc glm;
class (time period);
model AGE=(time period);
contrast 'linear' (time period) -3 -1 1 3;
run;

 

Thanks!

3 REPLIES 3
PaigeMiller
Diamond | Level 26

@EMB wrote:

Hello,

I wish to study trends in age over time in 3 large samples (>1000 individuals each) from the same population and get p for linear trend.

Samples are independent and data are available for 4 time periods separated by equal time-intervals.

Would the following be correct? Any other suggestion?

 

proc glm;
class (time period);
model AGE=(time period);
contrast 'linear' (time period) -3 -1 1 3;
run;



There are a few things you haven't told us, such as:

 

  1. For each individual, are the time intervals exactly the same?
  2. How can age be a response variable? If you measure the idividual's age at four different time periods ... isn't the individual's age already a known function of the age at the first time interval, plus the delta between the other intervals? What is the source of randomness in this data?
--
Paige Miller
EMB
Calcite | Level 5 EMB
Calcite | Level 5

The study includes incident cases of a specific disease, and data are collected at defined periods, each period includes different participants.  As part of the descriptive analysis I would like to look at trends over time in age of the diagnosed individuals.

PaigeMiller
Diamond | Level 26

@EMB wrote:

As part of the descriptive analysis I would like to look at trends over time in age of the diagnosed individuals.


I am totally not understanding this part.

 

Trends of what? Your sentence (and code) implies you want to find the trend over time of AGE. That cannot be right. Your age increases 1 year for every 1 year  of change in time. No statistics or regression or p-values needed.

--
Paige Miller

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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