I'm running a longitudinal model with time as the only predictor using R. I have also run it in HLM and SAS, which used maximum likelihood without listwise deletion. The results were the same. However, the results from R were slightly different. I think it might due to missing data. Here are my codes:

library(nlme) model.b <- lme(Y ~ TIME , data=d, na.action = na.exclude, random= ~ TIME | ID, method="ML")


1 Answer 1


SAS (prox mixed), HLM, and R (lme) handle missing data in exactly the same way -- namely by deletion of each row of the dataset where either the outcome or any of the predictor variables are missing. Therefore, this is not the reason why results from R were slightly different.

If you don't want to handle missing data that way, you will have to look into things like multiple imputation to first generate a complete dataset based on some sensible imputation model and then averaging parameter estimates as described by Rubin (1987).

Rubin, D. B. (1987). Multiple imputation for nonresponse in surveys. New York: Wiley & Sons.

  • 1
    $\begingroup$ The first approach (use all available rows) is preferred if you are using a full likelihood approach (e.g. mixed effects models or generalized least squares, or Bayesian hierarchical models) and you can make the missing at random assumption. This does not entail assuming missing completely at random but rather that dropout tendencies are captured by baseline covariates and previous longitudinal measurements. Multiple imputation is needed, for example, if you are using a non-full-likelihood approach such as GEE. $\endgroup$ Sep 20, 2015 at 13:06
  • $\begingroup$ I think it is convergence problem. R and HLM might have different strategies regarding to iteration. $\endgroup$
    – Mery
    Sep 25, 2015 at 17:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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