[R-sig-ME] Is there a way to deal with errors such as this?
Voeten, C.C.
c@c@voeten @end|ng |rom hum@|e|denun|v@n|
Mon Dec 16 13:49:56 CET 2019
Hi Rolf,
'theta' is the vector of random-effect parameters, obtained by getME(model,'theta'). I'm sure someone more knowledgeable than I can tell you their exact definition - I thought they are the entries of the lower Cholesky factor of the random-effects design matrix scaled by the model's residual error, but I may have gotten a few things mixed up here. 'fixef' is indeed just fixef(model).
HTH,
Cesko
-----Oorspronkelijk bericht-----
Van: R-sig-mixed-models <r-sig-mixed-models-bounces using r-project.org> Namens Rolf Turner
Verzonden: maandag 16 december 2019 00:08
Aan: D. Rizopoulos <d.rizopoulos using erasmusmc.nl>
CC: r-sig-mixed-models using r-project.org
Onderwerp: Re: [R-sig-ME] Is there a way to deal with errors such as this?
On 16/12/19 10:08 am, D. Rizopoulos wrote:
<SNIP>
> Moreover, if the main aim of the simulation is to assess some
> properties of the model and not of the optimization algorithm, you
> could help the optimization procedure by supplying as starting values
> for the model parameters the true parameters values from which you simulate the data.
That is a very appealing idea, but I'm afraid that I find the help for
glmer() to be utterly opaque in terms of the "start" argument. May I impose upon you for some help to get me, uh, started? ( :-) )
Explicitly, suppose that I have a data frame "protoX", and I fit a model:
protoFit <- glmer(cbind(Dead,Alive) ~ (0+Trt)/Dose + (Dose | Rep),
data=protoX,family=binomial(link="probit"))
Suppose that I then simulate data from protoFit:
X <- protoX
X[,c("Dead","Alive") <- simulate(protoFit)[,1]
The "true" values of the parameters in respect of fitting a model to X, will be the fitted parameters contained in protoFit. How do I specify these as starting values in a call to glmer()?
I would do something like:
fit <- glmer(cbind(Dead,Alive) ~ (0+Trt)/Dose + (Dose | Rep),
data=X,family=binomial(link="probit"),start=???)
What do I use for "???" ? The help seems to indicate that it should be a list with components "fixef" and "theta". I would conjecture that I'd get the "fixef" component as fixef(protoFit). However it is totally mysterious to me how I would get "theta" (or even what "theta" *is*).
Can you (or someone) point me in the right direction? (An *example* of the use of "start" in the help file would have been nice. :-( )
cheers,
Rolf
--
Honorary Research Fellow
Department of Statistics
University of Auckland
Phone: +64-9-373-7599 ext. 88276
_______________________________________________
R-sig-mixed-models using r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
More information about the R-sig-mixed-models
mailing list