Learn R Programming

ciuupi (version 1.1.0)

cpciuupi: Compute the coverage probability of the CIUUPI

Description

Evaluate the coverage probability of the confidence interval that utilizes uncertain prior information (CIUUPI) at gam.

Usage

cpciuupi(gam, bsvec, alpha, natural = 1, rho = NULL, a, c, x)

Arguments

gam

A value of gamma or vector of gamma values at which the coverage probability function is evaluated

bsvec

The vector (b(1),...,b(5),s(0),...,s(5)) that specifies the CIUUPI

alpha

The nominal coverage probability is 1 - alpha

natural

Equal to 1 (default) if the b and s functions are obtained by natural cubic spline interpolation or 0 if obtained by clamped cubic spline interpolation

rho

A known correlation

a

A vector used to specify the parameter of interest

c

A vector used to specify the parameter about which we have uncertain prior information

x

The n by p design matrix

Value

The value(s) of the coverage probability of the CIUUPI at gam.

Details

Suppose that $$y = X \beta + \epsilon$$ where \(y\) is a random \(n\)-vector of responses, \(X\) is a known \(n\) by \(p\) matrix with linearly independent columns, \(\beta\) is an unknown parameter \(p\)-vector and \(\epsilon\) is the random error with components that are iid normally distributed with zero mean and known variance. The parameter of interest is \(\theta = \) a' \(\beta\). The uncertain prior information is that \(\tau = \) c' \(\beta\) - t = 0, where a and c are specified linearly independent vectors and t is a specified number. rho is the known correlation between the least squares estimators of \(\theta\) and \(\tau\). The user must specify either a, c and x or rho. If a, c and x are specified then rho is computed.

The CIUUPI is specified by the vector (b(1),...,b(5),s(0),...,s(5)), alpha and natural

See Also

ciuupi, bsciuupi

Examples

Run this code
# NOT RUN {
alpha <- 0.05

# Find the vector (b(1),b(2),...,b(5),s(0),s(1),...,s(5)) that specifies the
# CIUUPI: (this may take a few minutes to run)
# }
# NOT RUN {
bsvec <- bsciuupi(alpha, rho = 0.4)
# }
# NOT RUN {
# The result (to 7 decimal places) is
bsvec <- c(0.129443483, 0.218926703, 0.125880945, 0.024672734, -0.001427343,
           1.792489585, 1.893870240, 2.081786492, 2.080407355,  1.986667246,
           1.958594824)

# Graph the coverage probability function
gam <- seq(0, 10, by = 0.1)
cp <- cpciuupi(gam, bsvec, alpha, rho = 0.4)
plot(gam, cp, type = "l", lwd = 2, ylab = "", las = 1, xaxs = "i",
main = "Coverage Probability", col = "blue",
xlab = expression(paste("|", gamma, "|")), ylim = c(0.94999, 0.95001))
abline(h = 1-alpha, lty = 2)

# }

Run the code above in your browser using DataLab