Learn R Programming

ciuupi (version 1.1.0)

bsciuupi: Compute the vector (b(1),...,b(5),s(0),...,s(5)) that specifies the CIUUPI

Description

Compute the vector (b(1),...,b(5),s(0),...,s(5)) that specifies the confidence interval that utilizes uncertain prior information (CIUUPI).

Usage

bsciuupi(alpha, natural = 1, rho = NULL, a, c, x)

Arguments

alpha

The minimum coverage probability is 1 - alpha

natural

Equal to 1 (default) if the functions b and s are found by natural cubic spline interpolation or 0 if these functions are found by clamped cubic spline interpolation in the interval [-6,6]

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 vector \((b(1), b(2), \dots, b(5), s(0), s(1), \dots, s(5))\) that specifies the CIUUPI.

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 confidence interval for \(\theta\), with minimum coverage probability 1 - alpha, that utilizes the uncertain prior information that \(\tau = \) 0 belongs to a class of confidence intervals indexed by the functions b and s. The function b is an odd continuous function and the function s is an even continuous function. In addition, b(x)=0 and s(x) is equal to the \(1 - \alpha/2\) quantile of the standard normal distribution for all |x| greater than or equal to 6. The values of these functions in the interval \([-6,6]\) are specified by \(b(1), b(2), \dots, b(5)\) and \(s(0), s(1), \dots, s(5)\) as follows. By assumption, \(b(0)=0\) and \(b(-i)=-b(i)\) and \(s(-i)=s(i)\) for \(i=1,...,6\). The values of \(b(x)\) and \(s(x)\) for any \(x\) in the interval \([-6,6]\) are found using cube spline interpolation for the given values of \(b(i)\) and \(s(i)\) for \(i=-6,-5,...,0,1,...,5,6\).

The vector \((b(1), b(2), \dots, b(5), s(0), s(1), \dots, s(5))\) is found by numerical constrained optimization so that the confidence interval has minimum coverage probability 1 - alpha and utilizes the uncertain prior information through its desirable expected length properties. The optimization is performed using the slsqp function in the nloptr package.

See Also

ciuupi

Examples

Run this code
# NOT RUN {
# Compute the vector (b(1),...,b(5),s(0),...,s(5)) that specifies the CIUUPI,
# for given alpha and rho: (may take a few minutes to run)
# }
# NOT RUN {
bsvec <- bsciuupi(0.05, 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)
bsvec

# Compute the vector (b(1),...,b(5),s(0),...,s(5)) that specifies the CIUUPI,
# for given alpha, a, c and x
x1 <- c(-1, 1, -1, 1)
x2 <- c(-1, -1, 1, 1)
x <- cbind(rep(1, 4), x1, x2, x1*x2)
a <- c(0, 2, 0, -2)
c <- c(0, 0, 0, 1)

# The following may take a few minutes to run:
# }
# NOT RUN {
bsvec2 <- bsciuupi(0.05, a = a, c = c, x = x)
# }
# NOT RUN {
# The result (to 7 decimal places) is
bsvec2 <- c(-0.03639701, -0.18051953, -0.25111411, -0.15830362, -0.04479113,
           1.71997203, 1.79147968, 2.03881195, 2.19926399, 2.11845381,
           2.00482563)
bsvec2

# }

Run the code above in your browser using DataLab