Solved – Multilevel models: Meaning of random intercept

mixed modelrepeated measuressas

I am quite confused at the moment regarding multilevel models as implemented in SAS PROC MIXED. I am new to mixed models.

Let's say I have 2 treatments, a new treatment and a control. And let's say that I have a sample of n subjects, each is contributing 1, 2 or 3 samples, i.e., the treatment (new or control) is being applied in 1 to 3 places in the subject's body.

I can't understand the difference between:

Proc mixed data=...
class Treatment SubjectID;
model Y = Treatment;
Random SubjectID;
run;

and

Proc mixed data=...
class Treatment SubjectID;
model Y = Treatment;
Random intercept / subject = SubjectID;
run;

I can't figure out this intercept / slope issue and its meaning.

Best Answer

Continuing @Peter Flom's example, it is equivalent to write the following two blocks:

proc mixed data=rc;
   class Batch;
   model Y = ;
   random batch;
run;

proc mixed data=rc;
   class Batch;
   model Y = ;
   random int / subject=batch;
run;

This first block adds a random effect term for each level of batch. The second block adds a random intercept and specifies that it varies from 'subject' to 'subject'.

Related Question