Learn R Programming

qgcomp (version 2.3.0)

modelbound.boot: Estimating qgcomp regression line confidence bounds

Description

Calculates: expected outcome (on the link scale), and upper and lower confidence intervals (both pointwise and simultaneous)

Usage

modelbound.boot(x, alpha = 0.05, pwonly = FALSE)

Arguments

x

"qgcompfit" object from `qgcomp.boot`,

alpha

alpha level for confidence intervals

pwonly

logical: return only pointwise estimates (suppress simultaneous estimates)

Value

A data frame containing expected values of the outcome at each quantized value of all exposures as well as "pointwise" (pw) and "simultaneous" (simul) confidence intervals at each each quantized value of all exposures.

Details

This method leverages the bootstrap distribution of qgcomp model coefficients to estimate pointwise regression line confidence bounds. These are defined as the bounds that, for each value of the independent variable X (here, X is the joint exposure quantiles) the 95 true value of E(Y|X) in 95 simultaneous bounds contain the true value of E(Y|X) for all values of X in 95 latter are more conservative and account for the multiple testing implied by the former. Pointwise bounds are calculated via the standard error for the estimates of E(Y|X), while the simultaneous bounds are estimated using the bootstrap method of Cheng (reference below). All bounds are large sample bounds that assume normality and thus will be underconservative in small samples. These bounds may also inclue illogical values (e.g. values less than 0 for a dichotomous outcome) and should be interpreted cautiously in small samples.

Reference:

Cheng, Russell CH. "Bootstrapping simultaneous confidence bands." Proceedings of the Winter Simulation Conference, 2005.. IEEE, 2005.

See Also

qgcomp.boot

Examples

Run this code
# NOT RUN {
set.seed(12)
# }
# NOT RUN {
dat <- data.frame(x1=(x1 <- runif(50)), x2=runif(50), x3=runif(50), z=runif(50),
                  y=runif(50)+x1+x1^2)
ft <- qgcomp.boot(y ~ z + x1 + x2 + x3, expnms=c('x1','x2','x3'), data=dat, q=5)
modelbound.boot(ft, 0.05)
# }

Run the code above in your browser using DataLab