Title: | Kabaila and Giri (2009) Confidence Interval |
---|---|
Description: | Computes a confidence interval for a specified linear combination of the regression parameters in a linear regression model with iid normal errors with unknown variance when there is uncertain prior information that a distinct specified linear combination of the regression parameters takes a specified number. This confidence interval, found by numerical nonlinear constrained optimization, has the required minimum coverage and utilizes this uncertain prior information through desirable expected length properties. This confidence interval is proposed by Kabaila, P. and Giri, K. (2009) <doi:10.1016/j.jspi.2009.03.018>. |
Authors: | Nishika Ranathunga [aut], Paul Kabaila [aut, cre] |
Maintainer: | Paul Kabaila <[email protected]> |
License: | GPL-2 |
Version: | 1.0.1 |
Built: | 2024-10-26 03:39:45 UTC |
Source: | https://github.com/cran/ciuupi2 |
Compute the vector (b(d/6),...,b(5d/6),s(0),...,s(5d/6)) that specifies the
Kabaila and Giri (2009) confidence interval that utilizes uncertain prior
information (CIUUPI) and has minimum coverage 1 - alpha
.
bsciuupi2(alpha, m, rho, obj = 1, natural = 1)
bsciuupi2(alpha, m, rho, obj = 1, natural = 1)
alpha |
The minimum coverage probability is 1 - |
m |
Degrees of freedom |
rho |
A known correlation |
obj |
Equal to 1 (default) for the first definition of the scaled expected length or 2 for the second definition of the scaled expected length |
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 [-d, d] |
Suppose that
where is a random
-vector of responses,
is a known
by
matrix
with linearly independent columns,
is an unknown parameter
-vector and
is the random error with components that
are independent and identically normally distributed with zero mean and
unknown variance. The parameter of interest is
a
'
. The uncertain prior information is that
c
' takes the value
t
, where a
and c
are specified linearly independent vectors nonzero -vectors and
t
is a specified number. rho
is the known correlation between
the least squares estimators of and
. It is
determined by the
by
design matrix X and the
-vectors a and c using
find_rho
.
The confidence interval for , with minimum coverage probability
1 - alpha
, that utilizes the uncertain prior information that
t
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 quantile of the
distribution
with
m
degrees of freedom for all |x| greater than or equal to d,
where d is a sufficiently large positive number (chosen by the function
bsciuupi2
). The values of these functions in the interval
are specified by the vectors
and
as follows. By
assumption,
and
and
for
. The values of
and
for any
in the interval
are found using cube spline interpolation for
the given values of
and
for
. The choices of
for
and
are
and
, respectively.
The vector is found by numerical nonlinear constrained optimization so that
the confidence interval has minimum coverage probability
1 - alpha
and utilizes the uncertain prior information that t through
its desirable expected length properties. The optimization is performed
using the
slsqp
function in the nloptr
package.
The first definition of the scaled expected length of the Kabaila and
Giri(2009) CIUUPI is the expected length of this confidence interval
divided by the expected length of the usual confidence interval with
coverage probability 1 - alpha
. The second definition of the scaled
expected length of the Kabaila and Giri(2009) CIUUPI is the expected value
of the ratio of the length of this confidence interval divided by the
length of the usual confidence interval, with coverage probability 1
- alpha
, computed from the same data.
In the examples, we continue with the same 2 x 2 factorial example
described in the documentation for find_rho
.
The vector that specifies the Kabaila & Giri (2009) CIUUPI, with
minimum coverage 1 -
alpha
.
Kabaila, P. and Giri, R. (2009). Confidence intervals in regression utilizing prior information. Journal of Statistical Planning and Inference, 139, 3419-3429.
# Compute the vector (b(d/6),...,b(5d/6),s(0),...,s(5d/6)) that specifies the # Kabaila & Giri (2009) CIUUPI, with minimum coverage 1 - alpha, # for the first definition of the scaled expected length (default) # for given alpha, m and rho (takes about 30 mins to run): bsvec <- bsciuupi2(alpha = 0.05, m = 8, rho = -0.7071068) # The result bsvec is (to 7 decimal places) the following: # c(-0.0287487, -0.2151595, -0.3430403, -0.3125889, -0.0852146, # 1.9795390, 2.0665414, 2.3984471, 2.6460159, 2.6170066, 2.3925494)
# Compute the vector (b(d/6),...,b(5d/6),s(0),...,s(5d/6)) that specifies the # Kabaila & Giri (2009) CIUUPI, with minimum coverage 1 - alpha, # for the first definition of the scaled expected length (default) # for given alpha, m and rho (takes about 30 mins to run): bsvec <- bsciuupi2(alpha = 0.05, m = 8, rho = -0.7071068) # The result bsvec is (to 7 decimal places) the following: # c(-0.0287487, -0.2151595, -0.3430403, -0.3125889, -0.0852146, # 1.9795390, 2.0665414, 2.3984471, 2.6460159, 2.6170066, 2.3925494)
Evaluate the functions b and s, as specified by the vector
(b(d/6),b(2d/6),...,b(5d/6),s(0),s(d/6),...,s(5d/6)) computed using
bsciuupi2
, alpha
, m
and natural
at x
.
bsspline2(x, bsvec, alpha, m, natural = 1)
bsspline2(x, bsvec, alpha, m, natural = 1)
x |
A value or vector of values at which the functions b and s are to be evaluated |
bsvec |
The vector |
alpha |
The minimum coverage probability is 1 - |
m |
Degrees of freedom |
natural |
Equal to 1 (default) if the b and s functions are evaluated by
natural cubic spline interpolation or 0 if evaluated by clamped cubic spline
interpolation. This parameter must take the same value as that used in
|
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
quantile of the
distribution with
m
degrees of freedom for all |x| greater than or equal to d, where d is a
sufficiently large positive number (chosen by the function
bsciuupi2
). The values of these functions in the interval
are specified by the vector
as follows. By assumption,
and
and
for
. The values of
and
for any
in the interval
are found using cubic spline interpolation for
the given values of
and
for
. The choices of
for
and
are
and
respectively.
The vector that specifies the Kabaila and Giri(2009) confidence interval that
utilizes uncertain prior information (CIUUPI), with minimum coverage
probability
1 - alpha
, is obtained using
bsciuupi2
.
In the examples, we continue with the same 2 x 2 factorial example described
in the documentation for find_rho
.
A data frame containing x
and the corresponding values of the
functions b and s.
Kabaila, P. and Giri, R. (2009). Confidence intervals in regression utilizing prior information. Journal of Statistical Planning and Inference, 139, 3419-3429.
alpha <- 0.05 m <- 8 # Find the vector (b(d/6),...,b(5d/6),s(0),...,s(5d/6)) that specifies the # Kabaila & Giri (2009) CIUUPI for the first definition of the # scaled expected length (default) (takes about 30 mins to run): bsvec <- bsciuupi2(alpha, m, rho = -0.7071068) # The result bsvec is (to 7 decimal places) the following: bsvec <- c(-0.0287487, -0.2151595, -0.3430403, -0.3125889, -0.0852146, 1.9795390, 2.0665414, 2.3984471, 2.6460159, 2.6170066, 2.3925494) # Graph the functions b and s x <- seq(0, 8, by = 0.1) splineval <- bsspline2(x, bsvec, alpha, m) plot(x, splineval[, 2], type = "l", main = "b function", ylab = " ", las = 1, lwd = 2, xaxs = "i", col = "blue") plot(x, splineval[, 3], type = "l", main = "s function", ylab = " ", las = 1, lwd = 2, xaxs = "i", col = "blue")
alpha <- 0.05 m <- 8 # Find the vector (b(d/6),...,b(5d/6),s(0),...,s(5d/6)) that specifies the # Kabaila & Giri (2009) CIUUPI for the first definition of the # scaled expected length (default) (takes about 30 mins to run): bsvec <- bsciuupi2(alpha, m, rho = -0.7071068) # The result bsvec is (to 7 decimal places) the following: bsvec <- c(-0.0287487, -0.2151595, -0.3430403, -0.3125889, -0.0852146, 1.9795390, 2.0665414, 2.3984471, 2.6460159, 2.6170066, 2.3925494) # Graph the functions b and s x <- seq(0, 8, by = 0.1) splineval <- bsspline2(x, bsvec, alpha, m) plot(x, splineval[, 2], type = "l", main = "b function", ylab = " ", las = 1, lwd = 2, xaxs = "i", col = "blue") plot(x, splineval[, 3], type = "l", main = "s function", ylab = " ", las = 1, lwd = 2, xaxs = "i", col = "blue")
Compute the usual 1 - alpha
confidence interval
cistandard2(X, a, y, alpha)
cistandard2(X, a, y, alpha)
X |
A known |
a |
A |
y |
The |
alpha |
1 - |
Suppose that
is a random -vector
of responses,
is a known
by
matrix with linearly
independent columns,
is an unknown parameter
-vector and
is the random error with components that
are independent and identically normally distributed with zero mean and
unknown variance. The parameter of interest is
a
'
, where
a
is a specified -vector.
Then
cistandard2
computes the usual 1 - alpha
confidence interval for ,
for given
-vector of observed responses
y
.
In the examples, we continue with the same 2 x 2 factorial example described
in the documentation for find_rho
, for the vector of observed
responses = (-1.3, 0.8, 2.6, 5.8, 0.3, 1.3, 4.3, 5.0, -0.4, 1.0,
5.2, 6.2).
The design matrix and the vector
a
(denoted in
R by a.vec) are entered into R using the commands
in the following example.
The usual 1 - alpha
confidence interval.
Kabaila, P. and Giri, K. (2009) Confidence intervals in regression utilizing prior information. Journal of Statistical Planning and Inference, 139, 3419 - 3429.
col1 <- rep(1,4) col2 <- c(-1, 1, -1, 1) col3 <- c(-1, -1, 1, 1) col4 <- c(1, -1, -1, 1) X.single.rep <- cbind(col1, col2, col3, col4) X <- rbind(X.single.rep, X.single.rep, X.single.rep) a.vec <- c(0, 2, 0, -2) y <- c(-1.3, 0.8, 2.6, 5.8, 0.3, 1.3, 4.3, 5.0, -0.4, 1.0, 5.2, 6.2) # Calculate the usual 95% confidence interval res <- cistandard2(X, a=a.vec, y, alpha = 0.05) res # The usual 1 - alpha confidence interval for theta is (-0.08185, 3.08185)
col1 <- rep(1,4) col2 <- c(-1, 1, -1, 1) col3 <- c(-1, -1, 1, 1) col4 <- c(1, -1, -1, 1) X.single.rep <- cbind(col1, col2, col3, col4) X <- rbind(X.single.rep, X.single.rep, X.single.rep) a.vec <- c(0, 2, 0, -2) y <- c(-1.3, 0.8, 2.6, 5.8, 0.3, 1.3, 4.3, 5.0, -0.4, 1.0, 5.2, 6.2) # Calculate the usual 95% confidence interval res <- cistandard2(X, a=a.vec, y, alpha = 0.05) res # The usual 1 - alpha confidence interval for theta is (-0.08185, 3.08185)
Compute the Kabaila and Giri (2009) confidence interval that utilizes
uncertain prior information (CIUUPI), with minimum coverage 1 - alpha
,
for a given vector y
of observed responses.
ciuupi2(alpha, X, a, c, bsvec, t, y, natural = 1)
ciuupi2(alpha, X, a, c, bsvec, t, y, natural = 1)
alpha |
1 - |
X |
The |
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 |
bsvec |
The vector (b(d/6),b(2d/6),...,b(5d/6),s(0),s(d/6),...,s(5d/6))
computed using |
t |
A number used to specify the uncertain prior information, which has
the form |
y |
The |
natural |
Equal to 1 (default) if the b and s functions are evaluated by
natural cubic spline interpolation or 0 if evaluated by clamped cubic spline
interpolation. This parameter must take the same value as that used in
|
Suppose that
where is a random
-vector of responses,
is a known
by
matrix
with linearly independent columns,
is an unknown parameter
-vector and
is a random
-vector with components
that are independent and identically normally distributed with zero mean and
unknown variance. The parameter of interest is
a
'
. The uncertain prior information is that
c
'
takes the value
t
, where a
and c
are
specified linearly independent vectors nonzero -vectors and
t
is a specified number. Given the vector bsvec
, computed using
bsciuupi2
, the design matrix X
, the vectors a
and c
and the number t, ciuupi2
computes the confidence
interval for that utilizes the uncertain prior information that
=
t
for given -vector of observed responses
y
.
In the examples, we continue with the same 2 x 2 factorial example described
in the documentation for find_rho
, for the vector of observed
responses = (-1.3, 0.8, 2.6, 5.8, 0.3, 1.3, 4.3, 5.0, -0.4, 1.0,
5.2, 6.2).
The Kabaila & Giri (2009) confidence interval, with minimum coverage 1
- alpha
, that utilizes the uncertain prior information.
Kabaila, P. and Giri, K. (2009) Confidence intervals in regression utilizing prior information. Journal of Statistical Planning and Inference, 139, 3419 - 3429.
# Specify the design matrix X and vectors a and c # (denoted in R by a.vec and c.vec, respectively) col1 <- rep(1,4) col2 <- c(-1, 1, -1, 1) col3 <- c(-1, -1, 1, 1) col4 <- c(1, -1, -1, 1) X.single.rep <- cbind(col1, col2, col3, col4) X <- rbind(X.single.rep, X.single.rep, X.single.rep) a.vec <- c(0, 2, 0, -2) c.vec <- c(0, 0, 0, 1) # Compute the vector (b(d/6),...,b(5d/6),s(0),...,s(5d/6)) that specifies the # Kabaila & Giri (2009) CIUUPI, with minimum coverage 1 - alpha, for the # first definition of the scaled expected length (default) # for given alpha, m and rho (takes about 30 mins to run): bsvec <- bsciuupi2(alpha = 0.05, m = 8, rho = -0.7071068) # The result bsvec is (to 7 decimal places) the following: bsvec <- c(-0.0287487, -0.2151595, -0.3430403, -0.3125889, -0.0852146, 1.9795390, 2.0665414, 2.3984471, 2.6460159, 2.6170066, 2.3925494) # Specify t and y t <- 0 y <- c(-1.3, 0.8, 2.6, 5.8, 0.3, 1.3, 4.3, 5.0, -0.4, 1.0, 5.2, 6.2) # Find the Kabaila and Giri (2009) CIUUPI, with minimum coverage 1 - alpha, # for the first definition of the scaled expected length res <- ciuupi2(alpha=0.05, X, a=a.vec, c=c.vec, bsvec, t, y, natural = 1) res # The Kabaila and Giri (2009) CIUUPI, with minimum coverage 1 - alpha, # is (0.14040, 2.85704). # The usual 1 - alpha confidence interval for theta is (-0.08185, 3.08185).
# Specify the design matrix X and vectors a and c # (denoted in R by a.vec and c.vec, respectively) col1 <- rep(1,4) col2 <- c(-1, 1, -1, 1) col3 <- c(-1, -1, 1, 1) col4 <- c(1, -1, -1, 1) X.single.rep <- cbind(col1, col2, col3, col4) X <- rbind(X.single.rep, X.single.rep, X.single.rep) a.vec <- c(0, 2, 0, -2) c.vec <- c(0, 0, 0, 1) # Compute the vector (b(d/6),...,b(5d/6),s(0),...,s(5d/6)) that specifies the # Kabaila & Giri (2009) CIUUPI, with minimum coverage 1 - alpha, for the # first definition of the scaled expected length (default) # for given alpha, m and rho (takes about 30 mins to run): bsvec <- bsciuupi2(alpha = 0.05, m = 8, rho = -0.7071068) # The result bsvec is (to 7 decimal places) the following: bsvec <- c(-0.0287487, -0.2151595, -0.3430403, -0.3125889, -0.0852146, 1.9795390, 2.0665414, 2.3984471, 2.6460159, 2.6170066, 2.3925494) # Specify t and y t <- 0 y <- c(-1.3, 0.8, 2.6, 5.8, 0.3, 1.3, 4.3, 5.0, -0.4, 1.0, 5.2, 6.2) # Find the Kabaila and Giri (2009) CIUUPI, with minimum coverage 1 - alpha, # for the first definition of the scaled expected length res <- ciuupi2(alpha=0.05, X, a=a.vec, c=c.vec, bsvec, t, y, natural = 1) res # The Kabaila and Giri (2009) CIUUPI, with minimum coverage 1 - alpha, # is (0.14040, 2.85704). # The usual 1 - alpha confidence interval for theta is (-0.08185, 3.08185).
Evaluate the coverage probability of the Kabaila & Giri (2009) confidence
interval that utilizes uncertain prior information (CIUUPI),
with minimum coverage 1 - alpha
, at gam
.
cpciuupi2(gam, bsvec, alpha, m, rho, natural = 1)
cpciuupi2(gam, bsvec, alpha, m, rho, natural = 1)
gam |
A value of gamma or vector of gamma values at which the coverage probability function is evaluated |
bsvec |
The vector (b(d/6),b(2d/6),...,b(5d/6),s(0),s(d/6),...,s(5d/6))
computed using |
alpha |
The minimum coverage probability is 1 - |
m |
Degrees of freedom |
rho |
A known correlation |
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. This parameter must take the same value as that used in
|
Suppose that
where is a random
-vector of responses,
is a known
by
matrix
with linearly independent columns,
is an unknown parameter
-vector and
is a random
-vector with
components that are independent and identically normally distributed with
zero mean and unknown variance. The parameter of interest is
a
' . The uncertain prior information is that
c
' takes the value
t
, 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
. It is determined by the
by
design matrix X and the
-vectors a and c using
find_rho
.
In the examples, we continue with the same 2 x 2 factorial example described
in the documentation for find_rho
.
The value(s) of the coverage probability of the Kabaila & Giri (2009)
CIUUPI at gam
.
Kabaila, P. and Giri, K. (2009) Confidence intervals in regression utilizing prior information. Journal of Statistical Planning and Inference, 139, 3419 - 3429.
alpha <- 0.05 m <- 8 # Find the vector (b(d/6),...,b(5d/6),s(0),...,s(5d/6)) that specifies the # Kabaila & Giri (2009) CIUUPI for the first definition of the # scaled expected length (default) (takes about 30 mins to run): bsvec <- bsciuupi2(alpha, m, rho = -0.7071068) # The result bsvec is (to 7 decimal places) the following: bsvec <- c(-0.0287487, -0.2151595, -0.3430403, -0.3125889, -0.0852146, 1.9795390, 2.0665414, 2.3984471, 2.6460159, 2.6170066, 2.3925494) # Graph the coverage probability function gam <- seq(0, 10, by = 0.1) cp <- cpciuupi2(gam, bsvec, alpha, m, rho = -0.7071068) plot(gam, cp, type = "l", lwd = 2, ylab = "", las = 1, xaxs = "i", main = "Coverage Probability", col = "blue", xlab = expression(paste("|", gamma, "|")), ylim = c(0.9490, 0.9510)) abline(h = 1-alpha, lty = 2)
alpha <- 0.05 m <- 8 # Find the vector (b(d/6),...,b(5d/6),s(0),...,s(5d/6)) that specifies the # Kabaila & Giri (2009) CIUUPI for the first definition of the # scaled expected length (default) (takes about 30 mins to run): bsvec <- bsciuupi2(alpha, m, rho = -0.7071068) # The result bsvec is (to 7 decimal places) the following: bsvec <- c(-0.0287487, -0.2151595, -0.3430403, -0.3125889, -0.0852146, 1.9795390, 2.0665414, 2.3984471, 2.6460159, 2.6170066, 2.3925494) # Graph the coverage probability function gam <- seq(0, 10, by = 0.1) cp <- cpciuupi2(gam, bsvec, alpha, m, rho = -0.7071068) plot(gam, cp, type = "l", lwd = 2, ylab = "", las = 1, xaxs = "i", main = "Coverage Probability", col = "blue", xlab = expression(paste("|", gamma, "|")), ylim = c(0.9490, 0.9510)) abline(h = 1-alpha, lty = 2)
Find the correlation rho for given by
design matrix X and
given
-vectors a and c
find_rho(X, a, c)
find_rho(X, a, c)
X |
The |
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 |
Suppose that
where is a random
-vector of responses,
is a known
by
matrix
with linearly independent columns,
is an unknown parameter
-vector and
is a random
-vector with
components that are independent and identically normally distributed with
zero mean and unknown variance. The parameter of interest is
a
' . The uncertain prior information is that
c
' takes the value
t
, where a
and
c
are specified linearly independent nonzero -vectors and
t
is a specified number. rho
is the known correlation between
the least squares estimators of and
. It is
determined by the
by
design matrix X and the
-vectors a and c.
The value of the correlation rho.
, a
and c
for a particular exampleConsider
the same 2 x 2 factorial example as that described in Section 4 of Kabaila
and Giri (2009), except that the number of replicates is 3 instead of 20.
In this case, is a 12 x 4 matrix,
is an unknown
parameter 4-vector and
is a random 12-vector with components
that are independent and identically normally distributed with zero mean
and unknown variance. In other words, the length of the response vector
is
= 12 and the length of the parameter vector
is
= 4, so that
= 8. The parameter of interest is
a
' , where the column vector
a
=
(0, 2, 0, -2). Also, the parameter
c
' ,
where the column vector
c
= (0, 0, 0, 1). The uncertain prior
information is that
t
, where t
= 0.
The design matrix and the vectors
a
and c
(denoted in
R by a.vec and c.vec, respectively) are entered into R using the commands
in the following example.
Kabaila, P. and Giri, R. (2009). Confidence intervals in regression utilizing prior information. Journal of Statistical Planning and Inference, 139, 3419-3429.
col1 <- rep(1,4) col2 <- c(-1, 1, -1, 1) col3 <- c(-1, -1, 1, 1) col4 <- c(1, -1, -1, 1) X.single.rep <- cbind(col1, col2, col3, col4) X <- rbind(X.single.rep, X.single.rep, X.single.rep) a.vec <- c(0, 2, 0, -2) c.vec <- c(0, 0, 0, 1) # Find the value of rho rho <- find_rho(X, a=a.vec, c=c.vec) rho # The value of rho is -0.7071068
col1 <- rep(1,4) col2 <- c(-1, 1, -1, 1) col3 <- c(-1, -1, 1, 1) col4 <- c(1, -1, -1, 1) X.single.rep <- cbind(col1, col2, col3, col4) X <- rbind(X.single.rep, X.single.rep, X.single.rep) a.vec <- c(0, 2, 0, -2) c.vec <- c(0, 0, 0, 1) # Find the value of rho rho <- find_rho(X, a=a.vec, c=c.vec) rho # The value of rho is -0.7071068
Evaluate the first definition of the scaled expected length of the Kabaila &
Giri (2009) confidence interval that utilizes uncertain prior information
(CIUUPI), with minimum coverage 1 - alpha
, at gam
.
sel1ciuupi2(gam, bsvec, alpha, m, rho, natural = 1)
sel1ciuupi2(gam, bsvec, alpha, m, rho, natural = 1)
gam |
A value of gamma or vector of gamma values at which the first definition of the scaled expected length function is evaluated |
bsvec |
The vector (b(d/6),b(2d/6),...,b(5d/6),s(0),s(d/6),...,s(5d/6))
computed using |
alpha |
The minimum coverage probability is 1 - |
m |
Degrees of freedom |
rho |
A known correlation |
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. This parameter must take the same value as that used in
|
Suppose that
where is a random
-vector of responses,
is a known
by
matrix with
linearly independent columns,
is an unknown parameter
-vector and
is a random
-vector with components
that are independent and identically normally distributed with zero mean and
unknown variance. The parameter of interest is
a
'
. The uncertain prior information is that
c
'
takes the value
t
, 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
. It is determined by the
by
design
matrix X and the
-vectors a and c using
find_rho
.
The Kabaila & Giri (2009) CIUUPI is specified by the vector
(b(d/6),...,b(5d/6),s(0),...,s(5d/6)), alpha
, m
and
natural
The first definition of the scaled expected length of the Kabaila and
Giri(2009) CIUUPI is the expected length of this confidence interval divided
by the expected length of the usual confidence interval with coverage
probability 1 - alpha
.
In the examples, we continue with the same 2 x 2 factorial example described
in the documentation for find_rho
.
The value(s) of the first definition of the scaled expected length of
the Kabaila & Giri (2009) CIUUPI at gam
.
Kabaila, P. and Giri, K. (2009) Confidence intervals in regression utilizing prior information. Journal of Statistical Planning and Inference, 139, 3419 - 3429.
alpha <- 0.05 m <- 8 # Find the vector (b(d/6),...,b(5d/6),s(0),...,s(5d/6)) that specifies the # Kabaila & Giri (2009) CIUUPI for the first definition of the # scaled expected length (default) (takes about 30 mins to run): bsvec <- bsciuupi2(alpha, m, rho = -0.7071068) # The result bsvec is (to 7 decimal places) the following: bsvec <- c(-0.0287487, -0.2151595, -0.3430403, -0.3125889, -0.0852146, 1.9795390, 2.0665414, 2.3984471, 2.6460159, 2.6170066, 2.3925494) # Graph the squared scaled expected length function gam <- seq(0, 10, by = 0.1) sel <- sel1ciuupi2(gam, bsvec, alpha, m, rho = -0.7071068) plot(gam, sel^2, type = "l", lwd = 2, ylab = "", las = 1, xaxs = "i", main = "Squared Scaled Expected Length", col = "blue", xlab = expression(paste("|", gamma, "|"))) abline(h = 1, lty = 2)
alpha <- 0.05 m <- 8 # Find the vector (b(d/6),...,b(5d/6),s(0),...,s(5d/6)) that specifies the # Kabaila & Giri (2009) CIUUPI for the first definition of the # scaled expected length (default) (takes about 30 mins to run): bsvec <- bsciuupi2(alpha, m, rho = -0.7071068) # The result bsvec is (to 7 decimal places) the following: bsvec <- c(-0.0287487, -0.2151595, -0.3430403, -0.3125889, -0.0852146, 1.9795390, 2.0665414, 2.3984471, 2.6460159, 2.6170066, 2.3925494) # Graph the squared scaled expected length function gam <- seq(0, 10, by = 0.1) sel <- sel1ciuupi2(gam, bsvec, alpha, m, rho = -0.7071068) plot(gam, sel^2, type = "l", lwd = 2, ylab = "", las = 1, xaxs = "i", main = "Squared Scaled Expected Length", col = "blue", xlab = expression(paste("|", gamma, "|"))) abline(h = 1, lty = 2)
Evaluate the second definition of the scaled expected length of the Kabaila &
Giri (2009) confidence interval that utilizes uncertain prior information
(CIUUPI), with minimum coverage 1 - alpha
, at gam
.
sel2ciuupi2(gam, bsvec, alpha, m, rho, natural = 1)
sel2ciuupi2(gam, bsvec, alpha, m, rho, natural = 1)
gam |
A value of gamma or vector of gamma values at which the second definition of the scaled expected length function is evaluated |
bsvec |
The vector (b(d/6),b(2d/6),...,b(5d/6),s(0),s(d/6),...,s(5d/6))
computed using |
alpha |
The minimum coverage probability is 1 - |
m |
Degrees of freedom |
rho |
A known correlation |
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. This parameter must take the same value as that used in
|
Suppose that
where is a random
-vector of responses,
is a known
by
matrix with
linearly independent columns,
is an unknown parameter
-vector and
is a random
-vector with components
that are independent and identically normally distributed with zero mean and
unknown variance. The parameter of interest is
a
'
. The uncertain prior information is that
c
'
takes the value
t
, 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
. It is determined by the
by
design
matrix X and the
-vectors a and c using
find_rho
.
The Kabaila & Giri (2009) CIUUPI is specified by the vector
(b(d/6),...,b(5d/6),s(0),...,s(5d/6)), alpha
, m
and
natural
The second definition of the scaled expected length of the Kabaila and
Giri(2009) CIUUPI is the expected value of the ratio of the length of this
confidence interval divided by the length of the usual confidence interval,
with coverage probability 1 - alpha
, computed from the same data.
In the examples, we continue with the same 2 x 2 factorial example described
in the documentation for find_rho
.
The value(s) of the second definition of the scaled expected length of
the Kabaila & Giri (2009) CIUUPI at gam
.
Kabaila, P. and Giri, K. (2009) Confidence intervals in regression utilizing prior information. Journal of Statistical Planning and Inference, 139, 3419 - 3429.
alpha <- 0.05 m <- 8 # Find the vector (b(d/6),...,b(5d/6),s(0),...,s(5d/6)) that specifies the # Kabaila & Giri (2009) CIUUPI for the second definition of the # scaled expected length (takes about 30 mins to run): bsvec <- bsciuupi2(alpha, m, rho = -0.7071068, obj = 2) # The result bsvec is (to 7 decimal places) the following: bsvec <- c(-0.0344224, -0.2195927, -0.3451243, -0.3235045, -0.1060439, 1.9753281, 2.0688684, 2.3803642, 2.6434660, 2.6288564, 2.4129931) # Graph the squared scaled expected length function gam <- seq(0, 10, by = 0.1) sel <- sel2ciuupi2(gam, bsvec, alpha, m, rho = -0.7071068) plot(gam, sel^2, type = "l", lwd = 2, ylab = "", las = 1, xaxs = "i", main = "Squared Scaled Expected Length", col = "blue", xlab = expression(paste("|", gamma, "|"))) abline(h = 1, lty = 2)
alpha <- 0.05 m <- 8 # Find the vector (b(d/6),...,b(5d/6),s(0),...,s(5d/6)) that specifies the # Kabaila & Giri (2009) CIUUPI for the second definition of the # scaled expected length (takes about 30 mins to run): bsvec <- bsciuupi2(alpha, m, rho = -0.7071068, obj = 2) # The result bsvec is (to 7 decimal places) the following: bsvec <- c(-0.0344224, -0.2195927, -0.3451243, -0.3235045, -0.1060439, 1.9753281, 2.0688684, 2.3803642, 2.6434660, 2.6288564, 2.4129931) # Graph the squared scaled expected length function gam <- seq(0, 10, by = 0.1) sel <- sel2ciuupi2(gam, bsvec, alpha, m, rho = -0.7071068) plot(gam, sel^2, type = "l", lwd = 2, ylab = "", las = 1, xaxs = "i", main = "Squared Scaled Expected Length", col = "blue", xlab = expression(paste("|", gamma, "|"))) abline(h = 1, lty = 2)