`rlafit` dosen't work anymore with the newest version0.2.0
Presviously we used rlafit()
simply giving :
op_model <- list(survey = data.frame(mean = north_sea_hp$SCANS$N_hat,
cv = north_sea_hp$SCANS$CVs,
# indicator variable of when the SCANS
# survey took place. 2016 is 51
scans = c(29, 40, 51)
),
removals = north_sea_hp$bycatch$mean
)
rlastan <- rstan::stan_model(model_code = rlastan_models$uniform,
model_name = "RLA"
)
mod <- rlafit(rlafit = rlafit,
rlastan = rlastan,
distribution = "truncnorm",
# get the complete stan output
everything = TRUE
)
But the RLA v0.2.0 doesn't seem to allow this.
Moreover the example of rlafit()
doesn't work, it gives :
Error: (class(op_model) == "pellatomlinson_dis") is not TRUE
This must come from the fact that rlafit()
requires a op_model
param which needs to be of class "pellatomlinson_dis".
Furthermore if we we force op_model
to be of class "pellatomlinson_dis", another error appears :
Error: length(spm) not equal to 7
which come from a call of standata()
in rlafit()
Edited by Mathieu Genu