Skip to content

R-sig-mixed-models

1 message · Iasonas Lamprianou

#
Dear friends, 
I am trying the following commands, because I want to explore my data before doing an analysis with TEACHER as random effect.
and i get this error        Error in na.fail.default(data) : missing values in object

what is this error? What do I do wrong?
 
Dr. Iasonas Lamprianou
Department of Education
The University of Manchester
Oxford Road, Manchester M13 9PL, UK
Tel. 0044 161 275 3485
iasonas.lamprianou at manchester.ac.uk


----- Original Message ----
From: "r-sig-mixed-models-request at r-project.org" <r-sig-mixed-models-request at r-project.org>
To: r-sig-mixed-models at r-project.org
Sent: Friday, 5 October, 2007 1:41:25 AM
Subject: R-sig-mixed-models Digest, Vol 10, Issue 4


Send R-sig-mixed-models mailing list submissions to
    r-sig-mixed-models at r-project.org

To subscribe or unsubscribe via the World Wide Web, visit
    https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
or, via email, send a message with subject or body 'help' to
    r-sig-mixed-models-request at r-project.org

You can reach the person managing the list at
    r-sig-mixed-models-owner at r-project.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of R-sig-mixed-models digest..."


Today's Topics:

   1. Re: Gastric emptying data: nlmer vs. nlme (Douglas Bates)
   2.  lmer vs lmer2 (dave fournier)
   3. Re: lmer vs lmer2 (Douglas Bates)


----------------------------------------------------------------------

Message: 1
Date: Thu, 4 Oct 2007 14:52:28 -0500
From: "Douglas Bates" <bates at stat.wisc.edu>
Subject: Re: [R-sig-ME] Gastric emptying data: nlmer vs. nlme
To: "Dieter Menne" <dieter.menne at menne-biomed.de>
Cc: r-sig-mixed-models at r-project.org
Message-ID:
    <40e66e0b0710041252w73c73e4aj340e031d2db416a4 at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

Dieter,

Thanks for the very thorough description of the problem and for
including a reproducible example.  I enclose a modified version of
your script and the output using the development version of the lme4
package (https://svn.R-project.org/R-packages/branches/gappy-lmer/)

You will see that the development version does better on the first
model but still ends up giving a "false convergence" message.  I then
fit ge0A.nlmer and added another model ge0B.nlmer that removes the
random effect for kappa.  The (conservative) p-value for a test of H0:
ge0B.nlmer versus Ha: ge0A.nlmer is
[1] 0.9510734

so incorporating random effects for kappa is, at best, marginally significant.

The reason that the first model is so difficult to fit is because
there are 6 variance-covariance parameters and only 8 levels of
subj:treat.  You are trying to estimate too many variance-covariance
parameters from too few groups.  The likelihood surface will be very
flat and the parameter estimates will be ill-defined.

The reason that nlmer from the 0.99875-8 release of lme4 gave up has
to do with the calculation of the conditional modes of the random
effects to evaluate the Laplace approximation to the deviance.  In
that version I retained the values of the conditional modes of the
random effects (these are the values the maximum the conditional
density of the random effects given the data and the current values of
the model parameters - the Laplace approximation is evaluated at these
values and the adaptive Gauss-Hermite approximation is centered around
these values) between evaluations of the deviance.  That's a good idea
because the vector of the conditional modes for a different set of
parameters is going to be similar to the current values so you have
good starting estimates.  However, it is a bad idea in that the
evaluation of the approximation to the deviance will not only depend
on the values of the parameters and the data but also on where the
last value was taken.  This means that the function value being
optimized is not reproducible and that causes a lot of problems in a
derivative-free optimization.

To avoid this I now start each evaluation of the conditional modes at
the same point (all random effects start at zero) so the evaluation is
reproducible.
On 10/1/07, Dieter Menne <dieter.menne at menne-biomed.de> wrote:
------------------------------

Message: 2
Date: Thu, 04 Oct 2007 22:46:50 -0700
From: dave fournier <otter at otter-rsch.com>
Subject: [R-sig-ME]  lmer vs lmer2
To: r-sig-mixed-models at r-project.org
Message-ID: <4705CFCA.9030100 at otter-rsch.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed


Hi,

I checked this example out with ADMB-RE using a modification of
our glmmADMB program  and have found the following:

1)

Parameter estimates with ADMB-RE are stable and
I get almost the same ones with or without the group 177 observations.

2) I get almost exactly the same LL estimate as SAS.

3) My estimates  for the fixed effects are similar to those in
    lmer2 except for the Intercept

Here are the estimates for lmer2 without group 177
    Estimate Std. Error t value
(Intercept) -1.948119   0.095877  -20.32
Height       1.640650   0.032800   50.02
Age          0.019379   0.001310   14.79
InitHeight   0.143977   0.111043    1.30
InitAge     -0.014618   0.007501   -1.95

these are the ADMB-RE estimates without group 177
  LL = 2294.85
   real_b           -2.0369e+000 1.0393e-001
   real_b           1.6460e+000 3.4587e-002
   real_b           1.9275e-002 1.3685e-003
   real_b           2.4857e-001 1.1984e-001
   real_b           -2.1290e-002 8.1749e-003

these are the estimates with group 177

   real_b           -2.0353e+000 1.0380e-001
   real_b           1.6438e+000 3.4430e-002
   real_b           1.9337e-002 1.3595e-003
   real_b           2.5070e-001 1.1966e-001
   real_b          -2.1486e-002 8.1618e-003

Here are the lmer2 estimates with group 177 included
(Intercept) -2.048023   0.101413  -20.19
Height       1.643644   0.031106   52.84
Age          0.019092   0.001391   13.73
InitHeight   0.262909   0.118516    2.22
InitAge     -0.021540   0.008111   -2.66

I think it is highly unlikely that the lmer2 estimate of
-1.948119 is the "correct" one and changes so much with
the addition of these few observations, while just by chance
ADMB-RE is wrong but happens to get the same estimate
for Intercept with and without group 177.
So it appears that lmer2 is not trustworthy.

Does anyone understand why the SAS point estimates appear to be 
completely different?

     Cheers,

       Dave



David A. Fournier
P.O. Box 2040,
Sidney, B.C. V8l 3S3
Canada
Phone/FAX 250-655-3364
http://otter-