Programming the statistical procedures from SAS

hoping for help with evaluating linear and nonlinear models for a longitudinal data set

Occasional Contributor
Posts: 12

hoping for help with evaluating linear and nonlinear models for a longitudinal data set

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;


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;

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


Thank you in advance!


Ask a Question
Discussion stats
  • 0 replies
  • 1 in conversation