Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweedie causes the R bomb #362

Open
rooperc4 opened this issue Jan 22, 2023 · 0 comments
Open

Tweedie causes the R bomb #362

rooperc4 opened this issue Jan 22, 2023 · 0 comments

Comments

@rooperc4
Copy link

I have been trying to fit a model to trawl survey data from BC using a tweedie distribution. Using VAST_v14_0_1, FishStatsUtils 2.12.0, INLA_22.12.16 and TMB V_1.9.1 and R V4.2.2. Attached are my settings files and below the code. This is a recent behaviour, in that I just was forced to upgrade R, Rstudio, VAST, TMB, INLA et al. It seemed to work previously. Also, seems to work fine for other models (deltagamma, deltalognormal).

When I go back to R 4.1.8 it seems to work (at least it goes through the process of estimating parameters and appears to finish), but has been running for about 24 hours and hasn't yet spit out the resulting model. Maybe the same issue, but without the R bomb?

settings = make_settings( n_x = 100,
Region = 'User',
purpose = "index2",
use_anisotropy = FALSE,
ObsModel= c(10,2),#tweedie
FieldConfig=c("Omega1"=0,"Omega2"="1","Epsilon1"=0,"Epsilon2"="1"),
#FieldConfig = matrix( c(0,0,0,"IID","IID","IID"), ncol=2, nrow=3, dimnames=list(c("Omega","Epsilon","Beta"),c("Component_1","Component_2"))),
bias.correct = FALSE)
user_region <- readRDS('user_region.rds')

fit = fit_model( settings = settings,
Lat_i = Data_Geostat[,'Lat'],
Lon_i = Data_Geostat[,'Lon'],
t_i = Data_Geostat[,'Year'],
b_i = Data_Geostat[,'Catch_KG'],
a_i = Data_Geostat[,'AreaSwept_km2'],
working_dir=paste0(getwd(),"/biomass/tweedie/"),
v_i = Data_Geostat[,'Vessel'] ,input_grid=user_region,newtonsteps = 0,getsd=FALSE)

plot(fit,working_dir=paste0(getwd(),"/biomass/tweedie/"))
settings.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant