Extracts data from metric graphs to be used by 'INLA' and 'inlabru'.
graph_data_spde(
graph_spde,
name = "field",
repl = NULL,
repl_col = NULL,
group = NULL,
group_col = NULL,
likelihood_col = NULL,
resp_col = NULL,
covariates = NULL,
only_pred = FALSE,
loc_name = NULL,
tibble = FALSE,
drop_na = FALSE,
drop_all_na = TRUE,
loc = deprecated()
)An 'INLA' and 'inlabru' friendly list with the data.
An inla_metric_graph_spde object built with the
graph_spde() function.
A character string with the base name of the effect.
Which replicates? If there is no replicates, one
can set repl to NULL. If one wants all replicates,
then one sets to repl to .all.
Column containing the replicates. If the replicate is the internal group variable, set the replicates
to ".group". If not replicates, set to NULL.
Which groups? If there is no groups, one
can set group to NULL. If one wants all groups,
then one sets to group to .all.
Which "column" of the data contains the group variable?
If only a single likelihood, this variable should be NULL. In case of multiple likelihoods, which column contains the variable indicating the number of the likelihood to be considered?
If only a single likelihood, this variable should be NULL. In case of multiple likelihoods, column containing the response variable.
Vector containing the column names of the covariates. If no covariates, then it should be NULL.
Should only return the data.frame to the prediction data?
Character with the name of the location variable to be used in 'inlabru' prediction.
Should the data be returned as a tidyr::tibble?
Should the rows with at least one NA for one of the columns be removed? DEFAULT is FALSE. This option is turned to FALSE if only_pred is TRUE.
Should the rows with all variables being NA be removed? DEFAULT is TRUE. This option is turned to FALSE if only_pred is TRUE.