comp_bayes_lm_ex {forestecology} | R Documentation |
Example bayesian competition model fit
Description
This object contains an example fitted Bayesian competition
model outputted by comp_bayes_lm()
.
Usage
comp_bayes_lm_ex
Format
A list subclass containing the following elements:
- prior_params
Prior parameters supplied to
comp_bayes_lm()
- post_params
Posterior parameters outputted by
comp_bayes_lm()
- terms
The formula object used in model fitting
See Also
Other example data objects:
blocks_ex
,
census_1_ex
,
census_2008_bw
,
census_2014_bw
,
census_2_ex
,
focal_vs_comp_ex
,
growth_ex
,
growth_spatial_ex
,
growth_toy
,
species_bw
,
study_region_bw
,
study_region_ex
Examples
library(dplyr)
library(yardstick)
# Compare model predictions to observation
predictions <- focal_vs_comp_ex %>%
mutate(growth_hat = predict(comp_bayes_lm_ex, focal_vs_comp_ex))
predictions %>%
rmse(truth = growth, estimate = growth_hat) %>%
pull(.estimate)
# Plot posterior parameters
comp_bayes_lm_ex %>%
autoplot()
[Package forestecology version 0.2.0 Index]