Hey guys, I have a question in PROC MIXED. I am analysing a dataset with several participants who have been tested four times with various time intervals. The demo dataset is as follows: DATA demo; INPUT ID $ sex $ group $ time DV IV1 IV2 IV3 ; DATALINES; 001 1 A 10 10 0.4 0.6 0.7 001 1 A 30 10 0.4 0.6 0.7 001 1 A 60 12 0.4 0.6 0.7 001 1 A 80 13 0.4 0.6 0.7 002 0 B 15 8 0.5 0.7 0.5 002 0 B 30 7 0.5 0.7 0.5 002 0 B 50 10 0.5 0.7 0.5 002 0 B 75 11 0.5 0.7 0.5 003 1 B 18 10 0.3 0.5 0.8 003 1 B 32 11 0.3 0.5 0.8 003 1 B 55 11 0.3 0.5 0.8 003 1 B 80 14 0.3 0.5 0.8 … ; The values of DV are measured four times while the time intervals vary with paticipants. The IV1, IV2 and IV3 are values of independent variables at baseline level. I would like to analysis the effect of time and baseline IV (separately) on DV while control for sex and group, and I assume there is a random effect of participant and time.Therefore, I use the following code: PROC MIXED DATA = demo; CLASS ID sex group; MODEL DV = IV1 time group|sex / SOLUTION; RANDOM intercept time / TYPE = VC SUBJECT = ID; REPEATED / SUBJECT = ID TYPE=SP(POW)(time); RUN; PROC MIXED DATA = demo; CLASS ID sex group; MODEL DV = IV2 time group|sex / SOLUTION; RANDOM intercept time / TYPE = VC SUBJECT = ID; REPEATED / SUBJECT = ID TYPE=SP(POW)(time); RUN; PROC MIXED DATA = demo; CLASS ID sex group; MODEL DV = IV3 time group|sex / SOLUTION; RANDOM intercept time / TYPE = VC SUBJECT = ID; REPEATED / SUBJECT = ID TYPE=SP(POW)(time); RUN; My question is: in the RANDOM and REPEATED statement, how can I decide which TYPE should be used? when I use the above codes, from the results, I find that the Estimate of time is the same in IV1, IV2 and IV3, but the Estimates of IVs are changed. Is that normal? Is that because I choose a wrong TYPE? Or should I add quadratic or cubic time? If so, how do I know whether to add quadratic and cubic time or not? Many thanks!
... View more