run_cv {forestecology} | R Documentation |
Run the bayesian model with spatial cross validation
Description
This function carries out the bayesian modeling process with spatial cross-validation as described in Allen and Kim (2020). Given a focal-competitor data frame, it appends a column with predicted growth values.
Usage
run_cv(
focal_vs_comp,
comp_dist,
blocks,
prior_param = NULL,
run_shuffle = FALSE
)
Arguments
focal_vs_comp |
data frame from |
comp_dist |
Distance to determine which neighboring trees to a focal tree are competitors. |
blocks |
An sf object of a |
prior_param |
A list of |
run_shuffle |
boolean as to whether to run permutation test shuffle of competitor tree species within a particular focal_ID |
Value
focal_vs_comp
with new column of predicted growth_hat
See Also
Other modeling functions:
comp_bayes_lm()
,
create_bayes_lm_data()
,
predict.comp_bayes_lm()
Examples
run_cv(
focal_vs_comp_ex,
comp_dist = 1,
blocks = blocks_ex
)