BookmarkSubscribeRSS Feed
kewong
Obsidian | Level 7

Hi everyone,

I am hoping to get your expertise on showing whether the change in median age over time is statistically different.

For example, here is what my data looks like:

Year2000200120022003200420052006
Median Age20221926232429

I would appreciate any help!  What statistical test should I use and please advise on the corresponding SAS code.

Many thanks!

2 REPLIES 2
SteveDenham
Jade | Level 19

With only this data, I think the first statistical test you might look at is whether there is a significant trend in the data, using linear regression.  Without the raw data or error estimates at each time point, I don't see any other way to attack this.  Any of the modeling procedures (REG, GLM, MIXED, GENMOD, GLIMMIX, HPMIXED, CALIS) could do this.

data have;

input year med_age;

datalines;

2000 20

2001 22

2002 19

2003 26

2004 23

2005 24

2006 29

;

proc reg data=have;

model med_age=year;

run;

This should get you started.

Steve Denham

LexE
Calcite | Level 5

Hi Steve,

 

I have a question that is similar to the one asked in this thread, but in my data, I have the raw data (and can therefore compute the error estimates) for each time point. In this case, what is the best way to analyze the median change over time?

 

For some context (and to help you better understand my question), I have a dataset with participants with seizures and want to see if their weekly seizure count (which is actually often a decimal, so not pure "count" data) decreases over the course of therapy. Because average weekly seizures is not normal, I would like to use medians to see if there is a decrease over time. I have the data for each individual without any missing data. My sample size is fairly small. What do you suggest?

 

-LexE

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
  • 2 replies
  • 1826 views
  • 0 likes
  • 3 in conversation