autoplot.comp_bayes_lm: Plot Bayesian model parameters

Description Usage Arguments Value Examples

View source: R/plot_functions.R

Description

Plot Bayesian model parameters

Usage

1
2
## S3 method for class 'comp_bayes_lm'
autoplot(object, type = "intercepts", sp_to_plot = NULL, ...)

Arguments

object

Output of comp_bayes_lm

type

A single character string for plot type with possible values "intercepts", "dbh_slopes", or "competition".

sp_to_plot

Vector of subset of species to plot

...

Currently ignored—only included for consistency with generic.

Value

focal_vs_comp with new column of predicted growth_hat

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
library(ggplot2)
library(ggridges)

# Load in posterior parameter example
data(comp_bayes_lm_ex)

# Plot beta_0, growth intercepts
autoplot(comp_bayes_lm_ex, type = "intercepts")

# Plot beta_dbh, growth-dbh slope
autoplot(comp_bayes_lm_ex, type = "dbh_slopes")

# Plot lambdas, competition coefficients
autoplot(comp_bayes_lm_ex, type = "competition")

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