Fit a Bayesian linear regression model with interactions terms where $$y = X \beta + \epsilon$$
| \(\mu\) | mean hyperparameter vector for \(\beta\) of length \(p + 1\) |
| \(V\) | covariance hyperparameter matrix for \(\beta\) of dimension \((p + 1) x (p + 1)\) |
| \(a\) | shape hyperparameter for \(\sigma^2 > 0\) |
| \(b\) | scale hyperparameter for \(\sigma^2 > 0\) |
comp_bayes_lm(focal_vs_comp, prior_param = NULL, run_shuffle = FALSE)
| 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 |
Closed-form solutions of Bayesian linear regression doi: 10.1371/journal.pone.0229930.s004
A list of {a_star, b_star, mu_star, V_star} posterior hyperparameters
Other modeling functions:
create_bayes_lm_data(),
predict.comp_bayes_lm(),
run_cv()