circ_odds {card} | R Documentation |
Odds Ratio Table by Time Point
Description
Creates an OR table for each time point of data given, initially applied to any grouping variable (particularly hour/time of day).
Usage
circ_odds(data, time, outcome, covar)
Arguments
data |
Dataframe containing subsequent columns |
time |
Column name that contains the grouping variable of time |
outcome |
Column name that identifies the per-row outcome, binary |
covar |
Vector of independent variables names. First variable needs to be exposure. |
Details
This function creates an OR table based on the covariate names supplied. It requires that there is an appropriate outcome variable selected. It performs a logistic regression. This model does not allow for conditioning variables (yet).
Value
A data frame of odds ratios
Examples
# Data
data(twins)
# Create odds ratio tables by hour of day for covariate of interest
ot <- circ_odds(twins, "hour", "sad_bin", "rDYX")
[Package card version 0.1.0 Index]