[R-sig-ME] lme4 and sample size

Douglas Bates bates at stat.wisc.edu
Thu Jan 26 20:03:03 CET 2012


On Wed, Jan 25, 2012 at 5:02 AM, Bouwmeester, W.
<W.Bouwmeester at umcutrecht.nl> wrote:
> Dear professor Bates,

> Is it possible to put the iteration information in an R object (this is printed when verbose=TRUE in the lmer function)?

> I like to monitor this output during simulations.

About the only way to do that is to use capture.output().  The
information on iterations comes from the optimizer, not from lmer.

> ________________________________________
> Van: dmbates at gmail.com [dmbates at gmail.com] namens Douglas Bates [bates at stat.wisc.edu]
> Verzonden: vrijdag 13 januari 2012 17:05
> To: Bouwmeester, W.
> Cc: R-mixed models mailing list
> Onderwerp: Re: lme4 and sample size
>
> On Fri, Jan 13, 2012 at 9:58 AM, Bouwmeester, W.
> <W.Bouwmeester at umcutrecht.nl> wrote:
>> Dear professor Bates,
>>
>> I'am using the lmer function indeed. Can I use 'cvg' from the output attr(model, "dims") to evaluate convergence? (here, the object "model" is fitted with the lmer function)
>
> Yes, but do bear in mind that the cvg indicator is from the optimizer,
> which is nlminb in the case of the released lme4.  We have encountered
> difficulties with nlminb failing to converge or giving the false
> convergence message or getting stuck at boundary values.  We later
> switched to the bobyqa optimizer from the minqa package and then to a
> local implementation of the Nelder-Mead simplex optimizer.
>
> Failure to converge is a property of the optimizer being used, not the
> overall design of lme4.  It happens that good optimizers that are
> available to Open Source projects are difficult to come by.
>
>> Van: dmbates at gmail.com [dmbates at gmail.com] namens Douglas Bates [bates at stat.wisc.edu]
>> Verzonden: vrijdag 13 januari 2012 16:51
>> To: Bouwmeester, W.
>> Onderwerp: Re: lme4 and sample size
>>
>> I have taken the liberty of copying the reply to the
>> R-SIG-Mixed-Models at R-Project.org mailing list so that it will be
>> available in a searchable archive.
>>
>> On Fri, Jan 13, 2012 at 9:37 AM, Bouwmeester, W.
>> <W.Bouwmeester at umcutrecht.nl> wrote:
>>> Dear professor Bates,
>>>
>>> I will incvestigate the required sample size to develop a prediction model in hierarchical data, using a simulation study. One of the model evaluation criteria will be whether the model converged. R will give warning messages if no or singular convergence appeared.
>>> Is it possible to evaluate model convergence from the cvg column in attr(mix.model,"dims")? Has this "cvg" anything to do with convergence?
>>>
>>> I saw this "cvg" output from attr(mix.model, "dims") in your publication on October 4, 2011, Linear mixed model implementation in lme4, page 6 and 20.
>>
>> I would strongly recommend using lmer instead of lme to fit
>> heirarchical linear models in a simulation study.  The lmer function
>> in the lme4 package is much faster and more reliable than the lme
>> function from the nlme package.
>>
>> The current version of lme4 on CRAN can sometimes encounter a warning
>> about "false convergence".  The version named lme4Eigen on the R-forge
>> site is, in our preliminary tests, more reliable and usually faster
>> than the released version.  You do need to be able to build an R
>> package from source to be able to use the lme4Eigen at present.
>> ------------------------------------------------------------------------------
>>
>> De informatie opgenomen in dit bericht kan vertrouwelijk zijn en is
>> uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onterecht
>> ontvangt, wordt u verzocht de inhoud niet te gebruiken en de afzender direct
>> te informeren door het bericht te retourneren. Het Universitair Medisch
>> Centrum Utrecht is een publiekrechtelijke rechtspersoon in de zin van de W.H.W.
>> (Wet Hoger Onderwijs en Wetenschappelijk Onderzoek) en staat geregistreerd bij
>> de Kamer van Koophandel voor Midden-Nederland onder nr. 30244197.
>>
>> Denk s.v.p aan het milieu voor u deze e-mail afdrukt.
>>
>> ------------------------------------------------------------------------------
>>
>> This message may contain confidential information and is intended exclusively
>> for the addressee. If you receive this message unintentionally, please do not
>> use the contents but notify the sender immediately by return e-mail. University
>> Medical Center Utrecht is a legal person by public law and is registered at
>> the Chamber of Commerce for Midden-Nederland under no. 30244197.
>>
>> Please consider the environment before printing this e-mail.




More information about the R-sig-mixed-models mailing list