Learn R Programming

ciuupi (version 1.1.0)

selciuupi: Compute the scaled expected length of the CIUUPI

Description

Evaluate the scaled expected length of the confidence interval that utilizes uncertain prior information (CIUUPI) at gam.

Usage

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

Arguments

gam

A value of gamma or vector of gamma values at which the scaled expected length function is evaluated

bsvec

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

alpha

The minimum coverage probability is 1 - alpha

natural

Equal to 1 (default) if the functions b and s 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 scaled expected length 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

The scaled expected length is defined as the expected length of the CIUUPI divided by the expected length of the standard confidence interval with the same minimum coverage probability.

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 scaled expected length function
gam <- seq(0, 8, by = 0.1)
sel <- selciuupi(gam, bsvec, alpha, rho = 0.4)
plot(gam, sel, type = "l", lwd = 2, ylab = "", las = 1, xaxs = "i",
main = "Scaled Expected Length", col = "blue",
xlab = expression(paste("|", gamma, "|")))
abline(h = 1, lty = 2)

# }

Run the code above in your browser using DataLab