[FLR-list] fmle with fixed parameters error
Iago Mosqueira
iago.mosqueira-sanchez at jrc.ec.europa.eu
Thu Feb 16 11:42:22 CET 2012
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
>
>
> _______________________________________________
> flr-list mailing list
> flr-list at flr-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/flr-list
Hi,
Are you fixing both parameters? Then the minimizer has nothing to do,
and the error comes from assigning results back to the params slots
where there are none to add.
To simply get the logl value you could call the function in the logl
slot on the values. I am actually adding today an computeLogl method to
do this, meantime try weith something like
logl(SR)(a=4.6, b=1.56, rec=rec(SR), ssb=ssb(SR))
Cheers,
Iago
--
Dr Iago Mosqueira
European Commission – Joint Research Center
Institute for the Protection and Security of the Citizen (IPSC)
Maritime Affairs Unit FISHREG – Scientific Support to Fisheries
TP 051, Via Enrico Fermi 2749
I-21027 Ispra (VA), Italy
Office : +39 0332 785413
Fax: +39 0332 789658
iago.mosqueira at jrc.ec.europa.eu
http://fishreg.jrc.ec.europa.eu/home
More information about the flr-list
mailing list