Plot output sensitivty to parameters

plot_prcc(sensitivity = NULL)

Arguments

sensitivity

A dataframe of sensitivity data as produced by test_prcc.

Value

A plot summarising model PRCC sensitivity to parameter changes.

Examples

## Code plot_prcc
#> function (sensitivity = NULL) #> { #> Parameter <- NULL #> Correlation <- NULL #> ranked_params <- sensitivity %>% arrange(abs(gamma)) %>% #> pull(Parameter) #> sens <- sensitivity %>% mutate(Correlation = ifelse(gamma < #> 0, "Negative", "Positive")) %>% mutate(Parameter = Parameter %>% #> factor(levels = ranked_params)) #> plot <- sens %>% ggplot(aes(x = abs(gamma), y = Parameter, #> col = Correlation)) + geom_point(size = 3) + geom_line(data = sens %>% #> bind_rows(sens %>% mutate(gamma = 0)), aes(group = Parameter), #> size = 1.2, alpha = 0.6) + scale_x_continuous(minor_breaks = NULL) + #> scale_color_viridis_d(option = "plasma", begin = 0.2, #> end = 0.8) + theme_minimal() + theme(legend.position = "top") + #> labs(x = "Correlation") #> return(plot) #> } #> <bytecode: 0x9f80bd8> #> <environment: namespace:ceplotr>