I have a longitudinal dataset that I am performing an HLM analysis on using lmer in lme4. I would like to compare the results from this analysis to the results on the same data but using glsin the nlme package.
There are multiple measures for each participant in the dataset and several of the participants have values missing at one or more timepoints.
lmer does not seem to have a problem with this, but when I ran the same analysis using gls I got an error message
Error in na.fail.default(list(id = c(1001L, 1002L, 1003L, 1004L, 1005L, :
missing values in object
So I have two questions
(1) how does lmer deal with the missing values?
(2) why does gls require 0 missing values when lmerseems to have no issue with NAs? I would rather not lose all that power by being forced to exclude all those participants who have missing data, so if there is some way to specify the same method of treating missing values in lmer except in gls that would be ideal. (otherwise multiple imputation I suppose?)