[R] maxNR in maxLik package never stops

Ott-Siim Toomet ott.toomet at ut.ee
Mon Aug 30 11:46:40 CEST 2010


Hi,

sure, maxNR uses 'iterlim' (or was it 'maxIter'?) where you can specify
the max # of iterations.  The default was 100 iterations, AFAIK.

There was a bug in one of the previous versions which lead to infinite
loops of constrained maximization.  Do you use constrained or
unconstrained?

and yes -- send us a (non)working example!

Best,
Ott

> Hi Martin!
>
> Which version of maxLik do you use?
> (You can figure this out, e.g. by typing 'help( package = "maxLik" )'
> at the R prompt.)
>
> If you are not using version 0.8-0, please upgrade to the latest version.
>
> You can get more information on the optimization process by adding
> "print.level=4" as argument of maxLik() or maxNR().
>
> You could send us also an example which allows us to replicate your
> problem.
>
> Best wishes,
> Arne
>
>
> On 29 August 2010 01:06, "Martin Bo�a" <hcd at azet.sk> wrote:
>>
>>
>>
>>
>>
>>
>> Greetings,
>>
>>
>>
>>  I use maxNR function under maxLik package to find the REML estimates
>> of the parameters of variance components in heteroskedastic linear
>> regression models. I assume that in the model there is
>> additive/multiplicative/mixed heteroskedasticity and I need estimate the
>> respective parameters of additive/multiplicative/mixed variance
>> components.
>>
>>
>>
>>  For my research purposes I make a batch of simulations and estimate
>> for the given design matrix but different (simulated) response vectors
>> the variance component parameters. However, it happens very frequently,
>> usually after the first simulation that the log-likelihood function
>> maximization step (for which maxNR is used) R "freezes". It appears
>> nothing wrong with R, it is working but the maximization never stops
>> (frankly, I cannot say that it is really "never", I did not allow it
>> more time than one day). Therefore, my simulations crash - I cannot even
>> perform one simulation.
>>
>>
>>
>>  I see two possible solutions:
>>
>>  1. Using some additional parameters of maxNR (such as number of
>> iterations or something).
>>
>>  2. Using some function that could help me control the length of the
>> maximization step - if it were to take to long, it would be evaluated as
>> an unsuccessful simulation.
>>
>>
>>
>>  Since I do not have much experience with R, it is clear to me that I
>> cannot resolve the thing myself. Maybe there are other viable solutions.
>>
>>
>>
>>  I shall be much obliged for your help and advice.
>>
>>
>>
>>
>> Martin Bo�a
>>
>>  (Matej Bel University / Faculty of Natural Sciences / Banská Bystrica
>> / Slovakia).
>>
>>
>>
>>
>>
>>        [[alternative HTML version deleted]]
>>
>>
>> ______________________________________________
>> R-help at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
>>
>
>
>
> --
> Arne Henningsen
> http://www.arne-henningsen.name
>



More information about the R-help mailing list