James-Thorson-NOAA / VAST

Spatio-temporal analysis of univariate or multivariate data, e.g., standardizing data for multiple species or stages
http://www.FishStats.org
GNU General Public License v3.0
124 stars 53 forks source link

Many zeros and some years with any observation #178

Open aastarloa opened 5 years ago

aastarloa commented 5 years ago

Hi, After having fitted a model for a quite common species, I wanted to try now with another species with less observations. I first tried to follow the same configuration that I used previously, i.e. ObsModel=c(1,1) FieldConfig=c(1,1,1,1) RhoConfig=c(4,4,4,4).

But I got this error:

Check bounds for the following parameters:

Param starting_value Lower MLE Upper final_gradient

13 logkappa2 -0.1053605 -5.787165 -3.506857 -3.506857 -0.3874677

So, I read some tips and tried to reduce the number of estimated parameters by: ObsModel=c(1,1) FieldConfig=c(1,1,0,0) RhoConfig=c(0,4,0,4).

I did not get any error this time, but the abundance index is suspiciously high some years. So, I was wondering if there is any other way to improve the fit for this case (I have tried using ObsModel=c(2,1) too but the AIC is higher).

Thanks,

James-Thorson-NOAA commented 5 years ago

Well, you could always try eliminating the lower and upper bounds, by passing a different default value via fit_model( ..., optimize_args=list("lower"=-Inf,"upper"=Inf)) and see if it is only slightly exceeding bounds (I put those as precautionary bounds to flag cases like this, but in some cases the model converges without them).

You could also bridge more slowly from one model to the other, to look for what specifically causes or fixes the converges issue (one step at a time changes in FieldConfig and RhoConfig).

You could also add covariates, which sometimes improve the info available.

Finally, you could try a multispecies model, e.g., https://academic.oup.com/icesjms/article/74/5/1311/2907795, which improves estimates of hyperparameters.

aastarloa commented 5 years ago

Ok, thank you very much. I may consider the multispecies model for future analyses.