You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By default inlabru calculates a 0.025, 0.5 and 0.975 quantile and uses these measurements in summary functions and plots. However for a specific application I prefer to use other quantiles in the estimation. If I pass on the quantiles to be calculated as an explicit option in inlabru, these are taken into account in the resulting inla call. E.g., via: inlabru::bru_options_set(quantiles = c(0.05, 0.5, 0.95)) # Set quantiles to be computed
However many of the inlabru functions still have the default quantiles hardcoded in. For instance here or here.
Any model fitted via the custom bru options specified above subsequently results in errors. Calling for instance inlabru:::plot.prediction on a model object with other specified quantiles returns this
Error in exp(spderesult$summary.log.range.nominal[["0.975quant"]]) :
non-numeric argument to mathematical function
A solution would be to add grep on the posterior names to get those columns with quant in its name.
The text was updated successfully, but these errors were encountered:
Some words seem to be missing (markdown issue?), but I get the main points, and the predict() output suffers from this issue as well; there's currently no option to safely alter the quantiles (although one can do it via manual processing of generate() output).
The predict method should allow user-defined quantiles
The automated plotting methods should detect the quantiles computed by inla and predict
The predict summary output should be standardised (and an optional broom style tidy() output option/postprocessing method added, even though the naming scheme from https://www.tidymodels.org/learn/develop/broom/#glossary has some terminology issues for Bayesian outputs)
By default
inlabru
calculates a 0.025, 0.5 and 0.975 quantile and uses these measurements in summary functions and plots. However for a specific application I prefer to use other quantiles in the estimation. If I pass on the quantiles to be calculated as an explicit option ininlabru
, these are taken into account in the resulting inla call. E.g., via:inlabru::bru_options_set(quantiles = c(0.05, 0.5, 0.95)) # Set quantiles to be computed
However many of the inlabru functions still have the default quantiles hardcoded in. For instance here or here.
Any model fitted via the custom bru options specified above subsequently results in errors. Calling for instance
inlabru:::plot.prediction
on a model object with other specified quantiles returns thisA solution would be to add
grep
on the posterior names to get those columns withquant
in its name.The text was updated successfully, but these errors were encountered: