[FLR-list] fmle with fixed parameters error

Laurie lauriekell at googlemail.com
Thu Feb 16 11:35:05 CET 2012


By using fmle you are trying to fit a model with 0 parameters.

The best way to calculate the likelihood conditional on a & b is to use 
the logl function slot in FLSR, e.g.

data(ple4)
pSR=fmle(as.FLSR(ple4,model="bevholt"))
pSR at logl(params(pSR)["a"],params(pSR)["b"],ssb(pSR),rec(pSR))

this is different from the logLik slot that just contains the value that fmle returned.

I did suggest that we tidy this up, e.g.

computeLogLik() would be a friendly wrapper aroundpSR at logl

Not sure if it was ever implemented, but I can easily add it.

Laurie


On 02/16/2012 11:09 AM, Hintzen, Niels wrote:
> Hi,
>
> Trying to calculate the likelihood of a SR fit using fmle, but this fails..
> The a and b parameters are obtained from a converged fit. Any idea what is going on here and how I can fix it?
>
> Thanks a lot. Using FLCore 2.4 on R2.13.2 in 32-bit mode.
>
> Niels
>
>
>
> fmle(SR.function,fixed=list(a=4.6,b=1.56))@details$value
>    Nelder-Mead direct search function minimizer
> function value for initial parameters = -12.689450
>    Scaled convergence tolerance is 1.89088e-07
> Stepsize computed as 0.100000
> Exiting from Nelder Mead minimizer
>      1 function evaluations used
> Error in do.call("[<-", c(list(x = x at .Data), dx, list(value = value))) :
>    replacement has length zero
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/flr-list/attachments/20120216/408f46fe/attachment.html>


More information about the flr-list mailing list