Experiment: Given mice of two genetic backgrounds (normal, mutant), is there a difference in brain inflammation as determined by fluorescence intensity of an inflammatory marker?

Data: 19 mice (12 in genotype = normal, 7 in genotype = mutant) across 90 observations (3-7 observations per mouse) were analyzed.

Model (code in R):

model = lme(inflammation ~ genotype + (1|mouse)) 

inflammation = continuous dependent variable

genotype = categorical independent variable (binary), fixed effects

mouse = arbitrary number, random effects

Does this sound right to you?

  • $\begingroup$ Have you factored the data frame? $\endgroup$ – noumenal Jul 29 '16 at 23:05
  • $\begingroup$ @noumenal what do you mean ? $\endgroup$ – Robert Long Jul 31 '16 at 7:36
  • $\begingroup$ Sorry for the lingo. For nominal variables it is good practice to update the data frame with as.factor: stat.ethz.ch/R-manual/R-devel/library/base/html/factor.html Also applies to ordinal vars, but see docs. $\endgroup$ – noumenal Jul 31 '16 at 9:36
  • $\begingroup$ @noumenal the question is about specifying a model, not how to code variables, but I agree with your advice about checking codings, as a general matter. $\endgroup$ – Robert Long Jul 31 '16 at 11:44
  • $\begingroup$ It was a comment, not an answer. $\endgroup$ – noumenal Jul 31 '16 at 16:29

Yes this is a good model for your data and your research question.

However, note that the syntax your wrote is for lmer from the lme4 package, not lme from the nlme package. lme4 is more recent is preferred to nlme unless you want to model covariance structures.

The model will estimate the fixed effect of genotype while controlling for the random effect of each mouse (since measurements on the same mouse may be more alike one another than those on a different mouse).

  • $\begingroup$ Thank you both! Re: gung - I'm not sure what you mean by this. Re: Robert long - thank you for sharing this! Yes, I think I mistyped the syntax and meant "lmer" as I used the library "lme4" $\endgroup$ – Robert Jul 31 '16 at 4:08
  • $\begingroup$ @Robert, I have edited the the title. gung simply made some edits to your OP. Maybe you are talking about the comment from noumenal ? I don't know what that means either. If you think I have answered your question, you can "accept" it. $\endgroup$ – Robert Long Jul 31 '16 at 7:35
  • $\begingroup$ Oh - sorry about that, I'm quite new to using the interface of stackexchange, and see why this comment is misplaced. $\endgroup$ – Robert Jul 31 '16 at 23:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.