View source: R/prep_MRF_covariates_spatial.R
prep_MRF_covariates_spatial | R Documentation |
This function performs the cross-multiplication necessary
for prepping datasets to be used in MRFcov_spatial
models.
prep_MRF_covariates_spatial(data, n_nodes, coords)
data |
Dataframe. The input data where the |
n_nodes |
Integer. The index of the last column in data which is represented by a node in the final graph. Columns with index greater than n_nodes are taken as covariates. Default is the number of columns in data, corresponding to no additional covariates |
coords |
A two-column |
Observations of nodes (species) in data
are prepped for
MRFcov_spatial
analysis by multiplication. This function is useful if
users wish to prep the spatial splines beforehand and split the
data manually for out-of-sample cross-validation. To do so,
prep the splines here and set prep_splines = FALSE
in MRFcov_spatial
Dataframe of the prepped response and covariate variables necessary for
input in MRFcov_spatial
models
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.