comp_bayes_lm_ex: Example bayesian competition model fit

Description Usage Format See Also Examples

Description

This object contains an example fitted Bayesian competition model outputted by comp_bayes_lm().

Usage

1

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

comp_bayes_lm()

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
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()

forestecology documentation built on Oct. 2, 2021, 5:07 p.m.