BookmarkSubscribeRSS Feed
SheilaSR
Obsidian | Level 7

Hi, I am a student using SAS studio to analyze a set of repeated measures/longitudinal data.  The beginning of my dataset looks like this and includes a total of 236 subjects. :

 subject trt sex age visit time visual
1 Active F 71 1 0 59
1 Active F 71 2 4 55
1 Active F 71 3 12 45
2 Active F 59 1 0 65
2 Active F 59 2 4 70
2 Active F 59 3 12 65
2 Active F 59 4 24 65
2 Active F 59 5 52 55
3 Placebo F 73 1 0 40
3 Placebo F 73 2 4 40

 

My response variable/outcome measure is the variable "visual". I am trying to determine whether there is a difference in the change in the visual outcome between the two treatment groups: Active and Placebo. 

 

Originally I analyzed my data with the following code:

 

proc mixed covtest data=MDwithMissing;
class trt subject time;
model visual=trt time trt*time/ddfm=kr;
random subject(trt);
repeated time/sub=subject(trt) type=ar(1) r rcorr;
run;

 

and I get an output that allows me to look at the fixed effects of trt, time, and trt*time. 

 

It was pointed out to me that the trend over time may not be linear. My hypothesis is that if the trend is not linear, it might be better fit with a model that has an exponential decay of visual over time.

 I'm trying to figure out:

 If I were to try to fit a model in Proc NLMIXED, can I look at the effect of trt, the effect of time and the interaction terms like I did in my proc mixed procedure, but include an exponential component of the model for the change in time? 

 

I was thinking something which expands on the code below but am uncertain of exactly how to do something like this and am wondering if anyone can offer any advice?

proc nlmixed data=MDwithMissing;

d=c*exp(-b*time);
ll = d+a*trt+b*trt*time;
model visual ~ general(ll);

 

Thank you in advance!

Sheila

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
  • 0 replies
  • 1113 views
  • 0 likes
  • 1 in conversation