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

Problems with the group specification #221

Open
JoseCansec opened this issue Dec 20, 2023 · 3 comments
Open

Problems with the group specification #221

JoseCansec opened this issue Dec 20, 2023 · 3 comments

Comments

@JoseCansec
Copy link

Dear Finn, we are currently trying to fit a separable spatio-temporal model which includes a grouping variable (id cell) within the temporal model (hour) specification. The main problem is that the amount of time it takes to fit the model, sometimes giving a inla.core crashed type of error. We are not sure if we are specyfing the control.group vairbable correctly as we want to include the repeated measurments within a cell (xy) during each hour. I share our model specification bellow:

Spatial model

cmp.d.sth2 = corden ~ 1 + myspde(main = coordinates, model = Hosts.spde.d)+
f2(hour.2,model="ou",n=n.hour,group=id.cell,ngroup=n.cell.pos,control.group =list(model="iid"))

Fit de model

bru.d.sth2 = bru(cmp.d.sth2, family = "gamma", data=pos2.0.sp,
options=list(num.threads="10", control.inla=list(int.strategy="eb", strategy="gaussian"),
control.compute = list(cpo = TRUE, dic = TRUE, waic = TRUE)))

Thank you in advance for the help and we look forward to your answer.
Jose

@finnlindgren
Copy link
Collaborator

Hard to say without more information. What's the data structure, e.g. head(pos2.0.sp) and str(pos2.0.sp)?
Also, try

bru.d.sth2 = bru(cmp.d.sth2, family = "gamma", data=pos2.0.sp,
  options=list(num.threads="10", control.inla=list(int.strategy="eb", strategy="gaussian"),
    control.compute = list(cpo = TRUE, dic = TRUE, waic = TRUE),
    bru_run = FALSE))
summary(bru.d.sth2, verbose = TRUE)

since that might show me some useful information as well.

@JoseCansec
Copy link
Author

JoseCansec commented Dec 21, 2023 via email

@finnlindgren
Copy link
Collaborator

finnlindgren commented Jan 15, 2024

Hi Jose, I'm now "back in action" after holidays and exam marking.
In your info above, you gave a different data variable, pos.15m, than the one used in the actual estimation, pos2.0.sp. Since the code uses sp features, I'll need to see the pos2.0.sp information, as pos.15m doesn't have any geometry information.
Also print(Hosts.spde.d$mesh) would be useful. The f2 component has around 31k elements, but I couldn't see the spde model size.

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

2 participants