Skip to content

Inconsistent Parameter Estimation in fmle  #79

Description

@MartaCousido

When using the fmle function to fit the Ricker stock-recruitment model to a FLStock object with 150 iterations, some iterations result in NA for the estimated parameters. However, if the model is fitted individually to those specific iterations (i.e., providing to fmle an FLStock object with only that iteration), the parameters are estimated correctly.

I can't find any explanation for this. It would be very useful to check what could be causing it.

I attached the RData where you can find in the stk_stf object the FLStock. The iters for which the parameters are NA are (53, 73, 108), below I provide the code:

data_FLSR <- as.FLSR(stk_stf)
model(data_FLSR) <- ricker()
system.time(stk_fit_FLSR <- fmle(data_FLSR))

Then fitting each ones of the iterations with NAs

a<-as.numeric(stk_fit_FLSR@params[1])
b<-as.numeric(stk_fit_FLSR@params[2])
inda=which(is.na(a))
indb=which(is.na(b))

i=1 #for example
data_FLSR_aux <- as.FLSR(stk_stf[,,,,,inda[i]])
model(data_FLSR_aux) <- ricker()
fmle(data_FLSR_aux)
data test.zip

Thanks for your help

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions