0

I have longitudinal data and specified 3 multilevel models for different outcomes with nlme in R.

'model <- lme (...)'

They all are based on the same dataset.

Now,

'summary(model)'

shows me that the observations used for my final three models vary. Probably, this is due to missing data that is different for every outcome (predictors stayed pretty much the same).

Is there a possibility to see, which observations of my dataset were included in each model? Note, that lme does not give me a S4 object, but medMer. Therefore,

'model@frame'

unfortunately does not work.

My aim is to give precise sample characteristics for each model. Therefore, I somehow need to adress the observations included each of them.

Thank you for any thoughts on this!

Lynn
  • 13
  • 3
  • If you have a model, `mod<-lmer(...)`, you can use `mod@frame` to return the data used in the model – Esther Jun 13 '18 at 05:31
  • Thank you for the answer. I should have been more precise: I am using mod <- lme (...) for my models, which gives me an object class of medMer and not S4. Therefore, mod@frame unfortunately does not work. Any ideas how to solve this? Would be greatly appreciated. – Lynn Jun 13 '18 at 14:33
  • If you're using `lme` that sounds like the `nlme` package, not `lme4`. In `nlme` does a call to `mod$data` return what you need? – Esther Jun 13 '18 at 15:49
  • Thanks again! But it seems like it only gives me the exact same dataset which I based my analysis on. I am sure that the multilevel models used only a subset of the data due to summary, but somehow it seems impossible to see which observations were used und which ones were not. – Lynn Jun 13 '18 at 16:18
  • Can you provide your data or an example of data and formula which creates the discrepancy? – Esther Jun 13 '18 at 18:51

0 Answers0