Title: | Wrapper Package for Tidy DLNM Output and Plots |
---|---|
Description: | tidydlnm is a wrapper package that converts output from the dlnm package into more tidyverse-friendly tibbles and plots. |
Authors: | Erika Rasnick [aut, cre] |
Maintainer: | Erika Rasnick <[email protected]> |
License: | GPL (>= 3) |
Version: | 0.0.1 |
Built: | 2024-11-23 02:47:36 UTC |
Source: | https://github.com/geomarker-io/tidydlnm |
get tibble of cumulative estimates at each lag
tidy_cumul_fits(cpred, call = rlang::caller_env())
tidy_cumul_fits(cpred, call = rlang::caller_env())
cpred |
a crosspred object created from |
call |
used for error handling |
a tibble with columns for lag, estimate, se, and lower and upper 95% confidence bounds (one row per lag)
get tibble of estimates at each lag
tidy_lag_fits(cpred, call = rlang::caller_env())
tidy_lag_fits(cpred, call = rlang::caller_env())
cpred |
a crosspred object created from |
call |
used for error handling |
a tibble with columns for lag, estimate, se, and lower and upper 95% confidence bounds (one row per lag)
plot estimate at each lag and confidence intervals using ggplot2
tidy_lag_plot( lag_fits, continuous = TRUE, shading = FALSE, shade_colors = c("red", NA, "blue") )
tidy_lag_plot( lag_fits, continuous = TRUE, shading = FALSE, shade_colors = c("red", NA, "blue") )
lag_fits |
tibble containing lag, estimate, and lower and upper bounds of
confidence intervals; most likely output from [ |
continuous |
logical. When TRUE, creates a plot with |
shading |
logical. When TRUE, adds colored shading to the regions of the plot corresponding to significant associations as defined by the signSum variable of lag_fits |
shade_colors |
vector of three colors desired to shade the regions of negative, null, and positive association, respectively. |
a ggplot object
get tibble of overall effect estimates
tidy_overall_fit(cpred, call = rlang::caller_env())
tidy_overall_fit(cpred, call = rlang::caller_env())
cpred |
a crosspred object created from |
call |
used for error handling |
a tibble with columns for estimate, se, and lower and upper 95% confidence bounds (1 row)
get tibble detailing each window of association with summary statistics
tidy_window_summary(lag_fits)
tidy_window_summary(lag_fits)
lag_fits |
tibble containing lag, estimate, and lower and upper bounds of confidence intervals; most likely output from tidy_lag_fits() or tidy_cumul_fits() |
a tibble containing windows defined by starting and ending lags, window length, maximum absolute effect estimate, and the lag at which that maximum occurs