I'm working with a mixed model to determine differences in liking for a food over a 16 week period based on covariates labeled group, diff3, and motive3. This is the code I am currently using:
proc mixed data=***.likinggroupsavg;
class group judge week motive3 diff3;
model like=group|week|motive3 group|week|diff3 thirsty;
random intercept / subject=judge;
repeated week / subject=judge type=AR(1);
LSmeans group|week|motive3 / diff slice=week;
LSmeans group|week|diff3 / diff slice=week;
ODS output diffs=difflong;
ODS output lsmeans=lsmlong;
run;
The problem: every time I run this code I get the message: 'an infinite likelihood is assumed in iteration 0 because of a nonpositive definite estimated R matrix for judge 1'.
I've tried researching this on my own and all info suggests I must have multiple observations for the same judge at the same time point. I've been through the data a number of times and this isn't the issue. When I remove 'week' after repeated, the model runs fine.
Is there someway to change the code to keep week as repeated without getting the error message? Any and all suggestions are appreciated!
proc mixed data=***.likinggroupsavg;
class group judge week motive3 diff3;
model like=group|week|motive3 group|week|diff3 thirsty;
random intercept / subject=judge;
repeated week / subject=judge type=AR(1);
LSmeans group|week|motive3 / diff slice=week;
LSmeans group|week|diff3 / diff slice=week;
ODS output diffs=difflong;
ODS output lsmeans=lsmlong;
run;
The problem: every time I run this code I get the message: 'an infinite likelihood is assumed in iteration 0 because of a nonpositive definite estimated R matrix for judge 1'.
I've tried researching this on my own and all info suggests I must have multiple observations for the same judge at the same time point. I've been through the data a number of times and this isn't the issue. When I remove 'week' after repeated, the model runs fine.
Is there someway to change the code to keep week as repeated without getting the error message? Any and all suggestions are appreciated!