This function mimics the output of a weighted quantile sums regression in large samples.
qgcomp.noboot(
f,
data,
expnms = NULL,
q = 4,
breaks = NULL,
id = NULL,
alpha = 0.05,
bayes = FALSE,
...
)
R style formula
data frame
character vector of exposures of interest
NULL or number of quantiles used to create quantile indicator variables representing the exposure variables. If NULL, then gcomp proceeds with un-transformed version of exposures in the input datasets (useful if data are already transformed, or for performing standard g-computation)
(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.
(optional) NULL, or variable name indexing individual units of observation (only needed if analyzing data with multiple observations per id/cluster)
alpha level for confidence limit calculation
use underlying Bayesian model (`arm` package defaults). Results in penalized parameter estimation that can help with very highly correlated exposures. Note: this does not lead to fully Bayesian inference in general, so results should be interpereted as frequentist.
arguments to glm (e.g. family)
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 (nweight) directions.
For continuous outcomes, under a linear model with no interaction terms, this is equivalent to g-computation of the effect of increasing every exposure by 1 quantile. For binary outcomes outcomes, this yields a conditional log odds ratio representing the change in the expected conditional odds (conditional on covariates) from increasing every exposure by 1 quantile. In general, the latter quantity is not equivalent to g-computation estimates. Hypothesis test statistics and 95 estimate variance of a linear combination of random variables.
qgcomp.boot
, and qgcomp
# NOT RUN {
set.seed(50)
dat <- data.frame(y=runif(50), x1=runif(50), x2=runif(50), z=runif(50))
qgcomp.noboot(f=y ~ z + x1 + x2, expnms = c('x1', 'x2'), data=dat, q=2)
# }
Run the code above in your browser using DataLab