casecross: Time-stratified case-crossover

Description Usage Arguments Examples

View source: R/casecross.R

Description

Function creates a time-stratified case-crossover dataframe from a case-only dataframe where the outcome on a particular date can be compared to referent periods on the same day of the week.

Usage

1
casecross(data, id, date, covariate = F, period = "month")

Arguments

data

Case-only observations you wish to create referent observations for

id

String of variable of strata identifier. Leave blank if you do not have a known identifier.

date

Date of admission. This is also sets the outcome variable to 1

covariate

Strings of covariates you'd like to include in the time-stratified dataframe

period

Character value based on lubridates floor and ceiling unit. Default is "month".

Examples

1

RyanGan/case.crossover documentation built on May 24, 2019, 5:02 a.m.