We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ts_qq_plot()
ts_qq_plot <- function(.calibration_tbl, .model_id = NULL , .interactive = FALSE){ # * Tidyeval ---- calibration_tbl <- .calibration_tbl model_id <- .model_id interactive_bool <- .interactive # * Checks ---- if(!modeltime::is_calibrated(calibration_tbl)){ stop(call. = FALSE, "You must supply a calibrated modeltime table.") } # Calibration Tibble filter if(is.null(model_id)){ calibration_tbl <- calibration_tbl } else { calibration_tbl <- calibration_tbl %>% dplyr::filter(.model_id == model_id) } g <- calibration_tbl %>% dplyr::ungroup() %>% dplyr::select(-.model, -.type) %>% tidyr::unnest(.calibration_data) %>% ggplot2::ggplot( mapping = ggplot2::aes( sample = .residuals , fill = .model_desc ) ) + ggplot2::stat_qq() + ggplot2::stat_qq_line() + ggplot2::facet_wrap( ~ .model_desc , scales = "free" ) + tidyquant::scale_color_tq() + ggplot2::theme_minimal() + ggplot2::theme(legend.position = "none") + ggplot2::labs( title = "QQ Scatter Plot" , x = "Theoretical Quantiles" , y = "Sample Quantiles" ) if(interactive_bool){ g <- plotly::ggplotly(g) } return(g) }
The text was updated successfully, but these errors were encountered:
c693926
Merge pull request #184 from spsanderson/development
59e5e8a
Fixes #181
spsanderson
No branches or pull requests
The text was updated successfully, but these errors were encountered: