The CDI plot presents the coefficients for the variable of interest (top-left panel), the spread of the data (bottom-left panel), and the influence statistic (bottom-right panel).
Usage
plot_bayesian_cdi(
fit,
xfocus = "area",
yfocus = "fishing_year",
xlab = NULL,
ylab = NULL,
hurdle = FALSE,
sort_coefs = FALSE,
axis.text.x.bl = TRUE,
colour = "purple",
p_margin = 0.05,
legend = TRUE,
sum_by = "row",
...
)
Arguments
- fit
An object of class
brmsfit
.- xfocus
The column name of the variable to be plotted on the x axis. This column name must match one of the column names in the
data.frame
that was passed tobrm
as thedata
argument.- yfocus
The column name of the variable to be plotted on the y axis. This column name must match one of the column names in the
data.frame
that was passed tobrm
as thedata
argument. This is generally the temporal variable in a generalised linear model (e.g. year).- xlab
The x axis label.
- ylab
The y axis label.
- hurdle
If a hurdle model then use the hurdle.
- sort_coefs
Should the coefficients be sorted from highest to lowest.
- axis.text.x.bl
Include the x axis labels on the bottom-left (bl) bubble plot panel.
- colour
The colour to use in the plot.
- p_margin
The margin between panels on the plot. This is passed to
margin
withintheme
.- legend
To show the legend or not.
- sum_by
Sum to 1 by row, sum to 1 by column, sum to 1 across all data, or raw. The size of the bubbles will be the same for all and raw, but the legend will change from numbers of records to a proportion.
- ...
Further arguments passed to nothing.
Author
Darcy Webber darcy@quantifish.co.nz