tidymodels / infer

An R package for tidyverse-friendly statistical inference
https://infer.tidymodels.org
Other
728 stars 80 forks source link

linetype not coming through in shade_ci() function #259

Closed ismayc closed 5 years ago

ismayc commented 5 years ago

I can't seem to get linetype to work with shade_confidence_interval() anymore. Observe the following examples:

#remotes::install_github("tidymodels/infer", ref = "develop")
library(infer)

download.file("http://www.openintro.org/stat/data/evals.RData", 
              destfile = "evals.RData")
load("evals.RData")

observed_slope <- evals %>% 
  specify(score ~ bty_avg) %>% 
  calculate(stat = "slope")

bootstrap_distn_slope <- evals %>% 
  specify(score ~ bty_avg) %>%
  generate(reps = 1000, type = "bootstrap") %>% 
  calculate(stat = "slope")

se_ci <- bootstrap_distn_slope %>% 
  get_ci(level = 0.95, type = "se", point_estimate = observed_slope)

visualize(bootstrap_distn_slope) +
  shade_confidence_interval(endpoints = se_ci, fill = NULL, 
                          linetype = "dashed", color = "black")


visualize(bootstrap_distn_slope) +
  shade_confidence_interval(endpoints = se_ci, fill = NULL, 
                            linetype = "dotted", color = "navy")


visualize(bootstrap_distn_slope) +
  shade_confidence_interval(endpoints = se_ci, fill = "lightgoldenrod", 
                            linetype = 2, color = "orange")


visualize(bootstrap_distn_slope) +
  shade_confidence_interval(endpoints = se_ci, fill = NULL, 
                            linetype = 3, color = "purple")

Created on 2019-10-26 by the reprex package (v0.3.0)

github-actions[bot] commented 3 years ago

This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.