# \donttest{
# Load example GHRmodels object from the package:
model_list_file <- system.file("examples", "model_list.rds", package = "GHRmodel")
model_list <- readRDS(model_list_file)
# Plot the estimated yearly random effects for three different models.
plot_re(
model = model_list, # A GHRmodels object
mod_id = c("mod1", "mod3", "mod5"), # IDs of the models
mod_label = c("Baseline", # Custom labels for the models
"tmin.l1_nl",
"pdsi.l1_nl + tmin.l1_nl"),
re_id = "year_id", # Name of the random effect variable
re_label = "year", # Label to map year_id to calendar years
ref_color = "grey", # Color for the reference model’s effects
palette = "IDE2", # Color for other model effects
title = "Yearly Random Effect", # Title for the plot
xlab = "Year" # Label for the x-axis
)
# }
Run the code above in your browser using DataLab