comp_bayes_lm {forestecology} | R Documentation |
Fit Bayesian competition model
Description
Fit a Bayesian linear regression model with interactions terms where
| mean hyperparameter vector for of length |
| covariance hyperparameter matrix for of dimension |
| shape hyperparameter for |
| scale hyperparameter for
|
Usage
comp_bayes_lm(focal_vs_comp, prior_param = NULL, run_shuffle = FALSE)
Arguments
focal_vs_comp |
data frame from |
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
A list of {a_star, b_star, mu_star, V_star}
posterior hyperparameters
Source
Closed-form solutions of Bayesian linear regression doi: 10.1371/journal.pone.0229930.s004
See Also
Other modeling functions:
create_bayes_lm_data()
,
predict.comp_bayes_lm()
,
run_cv()
Examples
library(dplyr)
# Load in focal versus comp
data(focal_vs_comp_ex)
comp_bayes_lm_ex <- focal_vs_comp_ex %>%
comp_bayes_lm(prior_param = NULL, run_shuffle = FALSE)
[Package forestecology version 0.2.0 Index]