qgcomp.cox.noboot  R Documentation 
This function performs quantile gcomputation in a survival setting. The approach estimates the covariateconditional hazard ratio for a joint change of 1 quantile in each exposure variable specified in expnms parameter
qgcomp.cox.noboot(
f,
data,
expnms = NULL,
q = 4,
breaks = NULL,
id = NULL,
weights,
cluster = NULL,
alpha = 0.05,
...
)
f 
R style survival formula, which includes 
data 
data frame 
expnms 
character vector of exposures of interest 
q 
NULL or number of quantiles used to create quantile indicator variables representing the exposure variables. If NULL, then gcomp proceeds with untransformed version of exposures in the input datasets (useful if data are already transformed, or for performing standard gcomputation) 
breaks 
(optional) NULL, or a list of (equal length) numeric vectors that characterize the minimum value of each category for which to break up the variables named in expnms. This is an alternative to using 'q' to define cutpoints. 
id 
(optional) NULL, or variable name indexing individual units of observation (only needed if analyzing data with multiple observations per id/cluster) 
weights 
"case weights"  passed to the "weight" argument of

cluster 
not yet implemented 
alpha 
alpha level for confidence limit calculation 
... 
arguments to glm (e.g. family) 
For survival outcomes (as specified using methods from the survival package), this yields a conditional log hazard ratio representing a change in the expected conditional hazard (conditional on covariates) from increasing every exposure by 1 quantile. In general, this quantity quantity is not equivalent to gcomputation estimates. Hypothesis test statistics and 95% confidence intervals are based on using the delta estimate variance of a linear combination of random variables.
a qgcompfit object, which contains information about the effect measure of interest (psi) and associated variance (var.psi), as well as information on the model fit (fit) and information on the weights/standardized coefficients in the positive (pos.weights) and negative (neg.weights) directions.
qgcomp.cox.boot
, qgcomp.glm.boot
,
and qgcomp
Other qgcomp_methods:
qgcomp.cch.noboot()
,
qgcomp.cox.boot()
,
qgcomp.glm.boot()
,
qgcomp.glm.noboot()
,
qgcomp.hurdle.boot()
,
qgcomp.hurdle.noboot()
,
qgcomp.multinomial.boot()
,
qgcomp.multinomial.noboot()
,
qgcomp.partials()
,
qgcomp.zi.boot()
,
qgcomp.zi.noboot()
set.seed(50)
N=200
dat < data.frame(time=(tmg < pmin(.1,rweibull(N, 10, 0.1))),
d=1.0*(tmg<0.1), x1=runif(N), x2=runif(N), z=runif(N))
expnms=paste0("x", 1:2)
f = survival::Surv(time, d)~x1 + x2
(fit1 < survival::coxph(f, data = dat))
(obj < qgcomp.cox.noboot(f, expnms = expnms, data = dat))
## Not run:
# weighted analysis
dat$w = runif(N)
qdata = quantize(dat, expnms=expnms)
(obj2 < qgcomp.cox.noboot(f, expnms = expnms, data = dat, weight=w))
obj2$fit
survival::coxph(f, data = qdata$data, weight=w)
# not run: bootstrapped version is much slower
(obj2 < qgcomp.cox.boot(f, expnms = expnms, data = dat, B=200, MCsize=20000))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.