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.
prep_MRF_covariates(data, n_nodes)
Dataframe of the prepped response and covariate variables necessary for
input in MRFcov
models
Dataframe. The input data where the n_nodes
left-most variables are outcome variables to be represented by nodes in the graph
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
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
)