Differences in random effect coding with lme in R

时间:2019-01-18 18:43:57

标签: r mixed-models nlme random-effects

I am writing mixed-models with a fixed and a random effect and I am not sure about the best way to implemet the random effect under lme.

I am dealing with measures taken from cells from four different donors infected with five bacterial strains. Thus, I have a measure for each cell coming from a given donor and infected with a given strain. I have many cells from each donor and bacterial strain. I am using Donor as a random effect and Strain as a fixed effect. However, these two line provide two different results, and I do not fully understand the difference between them. Any help on this would be much appreciated. Thanks.

lme (log.counts ~ Strain, random = ~ 1 | Donnor/Strain, data = data, method = "ML")
lme (log.counts ~ Strain, random = ~ 1 | Donnor, data = data, method = "ML")

0 个答案:

没有答案