[FLR-list] fmle with fixed parameters error

Iago Mosqueira iago.mosqueira-sanchez at jrc.ec.europa.eu
Thu Feb 16 11:53:38 CET 2012


On 02/16/2012 11:35 AM, Laurie wrote:
> 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


Yes, got the wrong name, it will be computeLogLik, and also 
computeResiduals.


Iago







>
>
> 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


-- 
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