Marginal Effects Plot of Diversity Index Model
Source:R/plot_effects_diversity.R
plot_effects_diversity.Rd
Marginal Effects Plot of Diversity Index Model
Arguments
- mod
A fitted model of class 'lm'
- df
A dataframe with the columns, lambda, abs_deviation_score_estimate, box_cox_abs_deviation_score_estimate, mean_diversity_index
- back_transform
logical, to back-transform box-cox transformed to absolute deviation scores or not
See also
Other Plotting functions:
get_forest_plot_data()
,
plot_cont_rating_effects()
,
plot_forest()
,
plot_model_means_box_cox_cat()
,
plot_model_means_orchard()
Examples
# targets::tar_load(ManyEcoEvo_results) #TODO change this to package data
# library(tidyverse)
# plot_effects_diversity(mod = ManyEcoEvo_results$sorensen_glm[[5]],
# df = ManyEcoEvo_results$effects_analysis[[5]] %>% #dat
# select(mean_diversity_index, study_id,
# starts_with("box_cox"),
# starts_with("abs_dev"),
# lambda),
# back_transform = TRUE)