Description Usage Arguments Details Value See Also Examples
Compute the vector (b(1),...,b(5),s(0),...,s(5)) that specifies the confidence interval that utilizes uncertain prior information (CIUUPI).
1 |
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 |
Suppose that
y = X β + ε
where y is a random n-vector of
responses, X is a known n by p matrix with linearly
independent columns, β is an unknown parameter p-vector and
ε is the random error with components that are iid normally distributed
with zero mean and known variance.
The parameter of interest is θ = a
' β. The uncertain
prior information is that τ = c
' β -
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 θ and τ.
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 θ, with minimum coverage probability
1 - alpha
, that utilizes the uncertain prior information that
τ = 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 - α/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), …, b(5) and
s(0), s(1), …, 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), …, b(5), s(0), s(1), …, 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.
The vector (b(1), b(2), …, b(5), s(0), s(1), …, s(5)) that specifies the CIUUPI.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | # 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)
bsvec <- bsciuupi(0.05, rho = 0.4)
# 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:
bsvec2 <- bsciuupi(0.05, a = a, c = c, x = x)
# 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
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.