Forest Plot of Hourly Odds
Creates an OR plot for each hour of data given. Its a ggplot format so additional variables, like titles, can be added in.
ggforest(ot, time = "time", or = "OR", lower = "Lower", upper = "Upper")
ot |
Odd Ratio table with the following columns. |
time |
Name of time variable (or "grouping" variable) |
or |
Name of column containing odds ratio |
lower |
Name of column of lower boundary of 95 percent CI |
upper |
Name of column of upper boundary of 95 percent CI |
This function creates a forest plot using the OR developed by the card::circ_odds function in this package. By default, it takes the output, which is a tibble named "ot", and will generate a forest plot based on the grouping variable (default is time of day). Original data can be restricted or the hours can be reduced).
A ggplot of forest plot that can be extended. Default theme is minimal and default color scheme is viridis.
# Data data(twins) ot <- circ_odds(twins, "hour", "sad_bin", "rDYX") # Plot library(ggplot2) ggforest(ot) + labs(title = "Example") + scale_color_viridis_c(option = "A")
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.