RMSTmisclass | R Documentation |
Estimate Treatment and Biomarker Effects on RMST in a Biomarker Stratified Clinical Trial with Misclassification
RMSTmisclass(dat, sens, spec, prev, tau)
dat |
the dataset that will be used to calculate estimates. The dataset needs to include columns called
|
sens |
the sensitivity of the biomarker test. |
spec |
the specificity of the biomarker test. |
prev |
the prevalence of the biomarker. |
tau |
restriction time for the RMST. |
a dataframe with estimated effects on RMST up to time tau, including treatment effects in the marker positive (M+) and negative (M-) groups, marker effects in the treatment (T+) and control (T-) groups, and the interaction effect (treatment effect in M+ group minus treatment effect in M- group). The dataframe also contains standard errors and p-values testing the null hypothesis that the difference in RMST = 0.
set.seed(23)
dat<- data.frame(trt = rep(0:1, each = 50), marker = rbinom(100, 1, prob = .3), cens = runif(100, 5, 15))
dat$ttime <- rexp(100, rate = exp(.1*dat$trt + .1*dat$marker - 0.7*dat$trt*dat$marker))
dat$dtime <- pmin(dat$ttime, dat$cens)
dat$dstatus <- (dat$ttime < dat$cens)
dat$test <- rbinom(100, 1, ifelse(dat$marker == 1, 0.8, 0.2))
RMSTmisclass(dat, sens=.8, spec=.8, prev=.3, tau = 10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.