Predictions from the survey index likelihood component
alfonsoperezrodriguez opened this issue · 2 comments
Hello, here another question.
I am using the survey index at age as likelihood components with a loglinearfit type.
My question is about the parameters intercept and slope. As far as I know what you compare with the observed index is not the Nt directly but intercept+slope*Nt, as it is indicated in the equation to estimate the loglikelihood score.
Then, the numbers in the file are the final survey index? Do I have to use the slope and intercept to transform the numbers in the table somehow?
Thanks,
Alfonso.
The comparison is based on a linear regression of the modeled abundance (or biomass), which can be log-transformed. The likelihood printer output from gadget prints out the raw modeled abundance, not the value which is used to compare with the data. To do this you need to take the alpha and beta to transform the output from gadget to be able to compare with the model. These numbers are printed at the bottom of the output file.
Note that all this is taken care of in Rgadget, so in R all you need to do:
fit <- gadget.fit(wgts=NULL, params.file = 'paramsfile') ## this will call gadget and get the fit to all likelihood components in the correct format..
fit$sidat
where fit$sidat
gives you the model output joined with the input data along with the transformed model index.
Thanks Bjarki, I will check in Rgadget code to find the way the parameters are used