This function fits a spatial model using Gaussian random fields with INLA.
The function is not intended to be used directly by the user, but
documentation is included so that you can see the argument values that you
might pass from fit_survey_sets()
. It is called internally by
fit_survey_sets()
.
fit_inla(dat, response = "present", n_knots = 50, family = "binomial", max_edge = c(20, 100), kmeans = FALSE, plot = FALSE, fit_model = TRUE, extend = list(n = 8, offset = -0.1), offset = c(5, 25), cutoff = 10, include_depth = TRUE, verbose = FALSE, debug = FALSE, trials = 10)
dat | A data frame from |
---|---|
response | A character value representing the column name for the response variable. |
n_knots | Number of knots in the mesh. Passed to |
family | Family to pass on to INLA. Like we should be "binomial" or "gamma". |
max_edge | Value to pass on to |
kmeans | Logical for whether to use |
plot | Logical for whether the INLA mesh should be plotted. |
fit_model | Logic for whether the model should be fitted. Useful for
debugging. Will return |
extend | Value to pass on to |
offset | Value to pass on to |
cutoff | Value to pass on to |
include_depth | Logical for whether to include depth as a predictor. |
verbose | Logical for verbose output from INLA. |
debug | Logical for debugging. |
trials | Number of times to retry the model if it fails to fit. |