Confidence intervals for the augmented-regression coefficients, either from the normal approximation using the bootstrap standard errors, or as bootstrap percentile intervals taken directly from the resampled coefficients.
Arguments
- object
a fitted model of class
"copreg".- parm
which parameters to report; a vector of names, or missing for all of them.
- level
the confidence level, default
0.95.- type
"normal"(the default), forcoef +/- qnorm(...) * std.error, or"percentile", for quantiles of the bootstrap draws inobject$boot.- ...
currently unused.
Value
A matrix with one row per requested parameter and two columns giving the lower and upper confidence limits.
References
Qian, Y., A. Koschmann, and H. Xie (2025). A practical guide to endogeneity correction using copulas. Journal of Marketing.
Examples
set.seed(1)
n <- 150
w <- rnorm(n)
p <- 0.4 * w + rt(n, df = 3)
xi <- 0.5 * p + rnorm(n)
y <- 1 + 2 * p + 1.5 * w + xi
dat <- data.frame(y = y, p = p, w = w)
fit <- endogCopula:::.copreg_fit(
formula = y ~ p | w, data = dat,
ctor = endogCopula:::.ctor_twostage(TRUE),
method = "2sCOPE", cdf = "rank.n", ties = "max",
nboots = 25, verbose = FALSE)
confint(fit, level = 0.90, type = "normal")
#> 5 % 95 %
#> (Intercept) 0.7276542 1.02755219
#> p 2.4644183 3.21299074
#> w 1.2388654 1.61980332
#> p_cop -1.1081964 0.08979654
confint(fit, type = "percentile")
#> 2.5 % 97.5 %
#> (Intercept) 0.6641320 0.9852160
#> p 2.2179720 2.9440920
#> w 1.3286318 1.7592068
#> p_cop -0.8223605 0.4500005
