11-24-2016 10:18 PM
Hi everybody ,
I have a longitudinal data on Body Mass Index BMI before and after medical intervention . I am running a mixed model that accounts for time interval between date of measurement and the date of intervention. I also included an interaction term.
the data looks like this :
ID BMI Time_interval Time
1 29 -10 Before
1 30 10 After
1 30.5 20 After
2 30.1 -8 Before
2 29.5 11 After
2 28.7 18 After
The model I used :
ods graphics on;
Proc mixed data = have plots= (Maxpoints=none);
class ID Time ;
model BMI= Time Time_interval Time*Time_interval /solution residual outpm=marg outp=cond vciry
influence(iter=0 effect=ID est) ;
random Time Time_interval /subject=pat_mrn_id type=UN g gcorr;
ods graphics off;
I keep receiving this message :
"Stopped because of too many likelihood evaluations"
any ideas ?
12-01-2016 08:25 AM - edited 12-01-2016 08:27 AM
The fact that your subjects are not measured at the same timepoints complicates things immensely.
It looks to me as if you are trying to fit BMI to time_interval, but that there is something unusual about the pre-intervention values. Using an unstructured covariance matrix with so many time_interval values, and with not every subject at those times leads to definite convergence problems.
If all of your data looks like this for the first two IDs, I might consider recoding time_interval to something like:
if time_interval<=0 then era=0;
if 0<time_interval<=10 then era=1;
if 10<time_interval<20 then era=2;
...more like this if needed...
Then I would try to fit the following model:
Proc mixed data = want plots= (Maxpoints=none); class ID era ; model BMI= era /solution residual outpm=marg outp=cond vciry influence(iter=0 effect=ID est) ; random intercept/subject=ID; repeated era /subject=ID type=ARH(1) g gcorr; run;
Now if you really don't like aggregating time_interval like this, I would suggest fitting some sort of spline, using the EFFECT statement.