Dear list,

I have some questions about how to specify the random effects in the 'lme'
function. My sample data is as below:

# Data name: collection

SampleID     Batch       value        Age
A1                batch1      0.898      32
A2                batch1      0.987      30
A3                batch1      0.989      30
.                    .                .            .
B1                batch2      0.767      40
B2                batch2      0.989      41
.                     .                .            .
.                     .                .            .
D9                batch4       0.678      20
D10              batch4       0.768      16

I want to see if the 'value' is associated with Age, and 'inter-individual
variation (SampleID)' and 'batch effects (Batch)' will be treated as random
effects. However, I don't know how to specify the random effects part.

My sample code:

fm <- lme(value~Age, random=~1|SampleID + Batch, na.action=na.omit,
data=collection)

I am pretty sure that this is not the right way, can anyone tell me how to
correct the 'random=~1|....' part?

Thank you very much,

Jackie

	[[alternative HTML version deleted]]


