time_stratified: Time-stratified case-crossover

Description Usage Arguments Examples

View source: R/time_stratified.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
2
time_stratified(data, id, covariate = F, admit_date, start_date, end_date,
  interval)

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.

covariate

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

admit_date

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

start_date

Start date of the period you wish to create referent observations over

end_date

End date of the period you with to create referent observations over

interval

Numberic value. Day == 1, Week = 7, Bi-weekly == 14, etc...

Examples

1

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