trim | R Documentation |
Removes a subset of estimates returned by est_ce
trim(ests, dat, quantiles, placebo = FALSE)
ests |
An object of class |
dat |
The data object originally passed into |
quantiles |
A vector of length 2 representing the quantiles of the
marker distribution at which to trim the data; if, for example,
|
placebo |
Boolean; if TRUE, quantiles are computed based on the marker distribution in the placebo arm instead of the vaccine arm |
A modified copy of ests
with the data trimmed.
data(hvtn505)
dat <- load_data(time="HIVwk28preunblfu", event="HIVwk28preunbl", vacc="trt",
marker="IgG_V2", covariates=c("age","BMI","bhvrisk"),
weights="wt", ph2="casecontrol", data=hvtn505)
ests_cox <- est_ce(dat=dat, type="Cox", t_0=578)
ests_cox_tr <- trim(ests_cox, dat=dat, quantiles=c(0.05,0.95))
plot_ce(ests_cox_tr, density_type="kde", dat=dat)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.