prep_MRF_covariates {MRFcov} | R Documentation |
Cross-multiply response and covariate variables
Description
This function performs the cross-multiplication necessary
for prepping datasets to be used in MRFcov
models. This
function is called by several of the functions within the package.
Usage
prep_MRF_covariates(data, n_nodes)
Arguments
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 |
Details
Observations of nodes (species) in data
are prepped for
MRFcov
analysis by multiplication. This function is not designed to be called directly,
but is used by other functions in the package (namely MRFcov
,
MRFcov_spatial
,
cv_MRF_diag
, and
bootstrap_MRF
)
Value
Dataframe of the prepped response and covariate variables necessary for
input in MRFcov
models