plot_fuzzy_chopsticks: Plot interactions with confidence intervals

Description Usage Arguments Examples

View source: R/plot-vocc-interaction.R

Description

Plot interactions with confidence intervals

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
plot_fuzzy_chopsticks(
  model,
  y_label = "Predicted biomass trend",
  x_variable = "temp_trend_scaled",
  type = NULL,
  colours = NULL,
  line_size = 0.7,
  alpha_range = c(0.25, 0.9),
  global_col = "gray30",
  choose_species = NULL,
  choose_age = NULL,
  order_by_chops = c("low", "high"),
  slopes = NULL,
  imm_model = NULL,
  imm_slopes = NULL,
  rug = F
)

Arguments

model

TMB model with X_pj and pred_dat elements

y_label

Label response variable

x_variable

Variable to plot on x axis

type

Interaction type, if more than one in model

colours

Default NULL gives red for high and blue for low

line_size

Change line thickness

alpha_range

Choose alpha for non-sig and sig slopes

global_col

Set colour for global chopsticks

choose_species

Option to choose just one species

choose_age

Option to choose just one age class

slopes

Df of slopes from chopstick_slopes function

imm_model

Add immature data from separate model

imm_slopes

Add separate slope df for immatures

rug

Logical for adding rug

order_var

Varible to order plots by

Examples

1
2
3
4
5
plot_fuzzy_chopsticks(model,
  y_label = "Predicted biomass trend",
  x_variable = "temp_trend_scaled",
  type = "temp"
)

pbs-assess/gfranges documentation built on Dec. 13, 2021, 4:50 p.m.