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:
Year | 2000 | 2001 | 2002 | 2003 | 2004 | 2005 | 2006 |
Median Age | 20 | 22 | 19 | 26 | 23 | 24 | 29 |
I would appreciate any help! What statistical test should I use and please advise on the corresponding SAS code.
Many thanks!
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
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 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.