Weighted conditional logistic regression for case-time-control with bootstrapped CIs
Source:R/CXO_tc_funcs.R
CXO_tc_wt_boot.Rd
Weighted conditional logistic regression for case-time-control with bootstrapped CIs
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:
Variable | Parameter name |
est0 | OR from weighted conditional logistic regression |
est | Bootstrapped OR: mean if normal = T, median otherwise |
lower | Lower Bootstrapped 95% CI: using normal approximation if normal = T, 2.5th quantile otherwise |
upper | Upper 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)
}