-
Notifications
You must be signed in to change notification settings - Fork 21
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
how to pass parameters to control.fixed? #46
Comments
I have an email thread with another user from a few weeks back that looked at this in some detail, including providing some solutions. I’ll try to extract the relevant bits and put here, awaiting a full solution in the package. |
Even if inlabru would recognise control.fixed and pass it on to inla(), this would not have the desired effect. The reason is that internally, fixed effect terms are re-interpreted as f(..., model="linear") terms before the inla() call, and control.fixed doesn't apply to such model components. Until we come up with a way to automate it by using the information in control.fixed in the re-interpretation step, the following workaround can be used:
by
Full example attached: Note that this also applies to the intercept term, so to control the prior for that you need to include it explicitly, with Dev notes: |
The workaround works fine. I would suggest to update the documentation that mentions This issue can be closed. |
Ah, I didn’t realise that’s in the documentation! Will fix it! |
Updated code (removing no longer needed control.fixed from the correct |
Create some example data
Model it with INLA. First using the defaults, then fixed the parameter of logArea to 1 by setting the prior to mean = 1 and var = 0.
bru()
seems to ignore the options when passed as a list. Passing the output ofbru.options()
yields an error.Error in (function (data, model, stackmaker, n = 10, result = NULL, family, :
INLA returned message: unused argument (inla.options = list(list(TRUE, TRUE, TRUE), list("auto"), list(list(1, 0), list(1e+20, 0.001))))
In addition: Warning message:
In (function (formula, family = "gaussian", contrasts = NULL, data, :
Error in (function (data, model, stackmaker, n = 10, result = NULL, family, :
INLA returned message: unused argument (inla.options = list(list(TRUE, TRUE, TRUE), list("auto"), list(list(1, 0), list(1e+20, 0.001))))
SessionInfo
The text was updated successfully, but these errors were encountered: