24 July 2020 4 3K Report

Hello,

I am struggling to understand how I best use the na.action options in R's lme function for a hierarchical linear model.

I have a longitudinal data set with a two-level nested structure (occasion-level variables nested within person-level variables). My data is in long format. To test my hypotheses, I would like to perform multilevel modelling in R using lme(). Since my data contains missings, I get an error because lme() does not know what to do with these values. For my data, case wise or list wise deletion would be unfavourable.

There was a previous post on a similar topic regarding the lmer function

(https://www.researchgate.net/post/How_are_missing_data_handled_in_linear_mixed_effects_models). But I am still not sure if it is even possible to include observations with missings in the outcome variable in R's lme(). In Andy Fields' "Discovering Statistics with R", I read that na.omit and na.exclude both lead to case wise deletion and thus remove a complete observation if any of the variables used in the model contain NA.

How can I ensure to include observations with missings in my outcome variable using lme()?

Thanks in advance!

Leah

More Leah Just's questions See All
Similar questions and discussions