Skip to contents

Weighted conditional logistic regression for case-time-control with bootstrapped CIs

Usage

CXO_tc_wt_boot(data, exposure, event, Id, tvc = NULL, B = 500, normal = TRUE)

Arguments

data

input dataframe

exposure

exposure variable

event

outcome

Id

person Id

tvc

time-varying confounder (optional)

B

number of bootstrapped replicates, default is 500. Minimum 200 recommended

normal

use normal approximation for bootstrapped CI, default is TRUE normal = F uses 2.5% and 97.% quantiles for 95% CI

Value

A list containing:

VariableParameter name
est0OR from weighted conditional logistic regression
estBootstrapped OR: mean if normal = T, median otherwise
lowerLower Bootstrapped 95% CI: using normal approximation if normal = T, 2.5th quantile otherwise
upperUpper Bootstrapped 95% CI: using normal approximation if normal = T, 97.5th quantile otherwise

Examples


data(casetimecontrols)
try(CXO_tc_wt_boot(casetimecontrols, exposure = ex, event = Event, Id = Id, B = 3))
#>        Variable      est0      est     lower    upper
#> ex1         ex1 0.9828992 1.099443 0.8755457 1.380595
#> ex_tc1   ex_tc1 1.5681218 1.440424 1.2513377 1.658083

# It is recommended that at least 500 bootstrap replications are used
if (FALSE) {

CXO_tc_wt_boot(casetimecontrols, exposure = ex, event = Event, Id=Id, B = 1000)
}