# Compare using lme4 and nlme for mixed effects models

Sorry it might be a more Stack Overflow question but I was reading this nice cheat sheet for using function lmer in package lme4 in R, and here is the link on Cross Validated. I will give a screenshot as below:

So I was wondering could anyone help create a similar cheat sheet for using function lme in package nlme?

I was reading the general examples for using lme as

The examples are very limited. It seems if we do not specify the random part in lme, then the variables list in the fixed effect part will also be considered as random.

Function lme() also works with a special class of data frames defined in package nlme, which are called groupedData. In this data frame a formula for the grouping structure is provided that lme() directly uses if the random argument is not specified. If you don't use a groupedData (that contains the random-effects structure) and do not specify the random argument, lme() will through an error.
• But how does this answer the question So I was wondering could anyone help create a similar cheat sheet for using function lme in package nlme? – user2974951 Feb 20 at 7:43