Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

circ_odds

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")

card

Cardiovascular and Autonomic Research Design

v0.1.0
MIT + file LICENSE
Authors
Anish S. Shah [aut, cre, cph] (<https://orcid.org/0000-0002-9729-1558>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.