Type: | Package |
Title: | Kabaila and Giri (2009) Confidence Interval |
Version: | 1.0.1 |
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>. |
License: | GPL-2 |
Encoding: | UTF-8 |
LazyData: | true |
Imports: | functional, nloptr, pracma, PreciseSums, statmod |
RoxygenNote: | 7.1.1 |
Suggests: | knitr, rmarkdown |
VignetteBuilder: | knitr |
NeedsCompilation: | no |
Packaged: | 2021-03-09 22:47:04 UTC; 18881372 |
Author: | Nishika Ranathunga [aut], Paul Kabaila [aut, cre] |
Maintainer: | Paul Kabaila <P.Kabaila@latrobe.edu.au> |
Repository: | CRAN |
Date/Publication: | 2021-03-11 15:40:02 UTC |
Compute the vector (b(d/6),...,b(5d/6),s(0),...,s(5d/6)) that specifies the Kabaila & Giri (2009) CIUUPI
Description
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
.
Usage
bsciuupi2(alpha, m, rho, obj = 1, natural = 1)
Arguments
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] |
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 independent and identically normally distributed with zero mean and
unknown variance. The parameter of interest is \theta =
a
'
\beta
. The uncertain prior information is that \tau =
c
' \beta
takes the value t
, where a
and c
are specified linearly independent vectors nonzero p
-vectors and
t
is a specified number. rho
is the known correlation between
the least squares estimators of \theta
and \tau
. It is
determined by the n
by p
design matrix X and the
p
-vectors a and c using find_rho
.
The confidence interval for \theta
, with minimum coverage probability
1 - alpha
, that utilizes the uncertain prior information that
\tau =
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 1 - \alpha/2
quantile of the t
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
[-d,d]
are specified by the vectors (b(d/6), b(2d/6), \dots,
b(5d/6))
and (s(0), s(d/6), \dots, s(5d/6))
as follows. By
assumption, b(0)=0
and b(-i)=-b(i)
and s(-i)=s(i)
for
i=d/6,...,d
. The values of b(x)
and s(x)
for any x
in the interval [-d,d]
are found using cube spline interpolation for
the given values of b(i)
and s(i)
for
i=-d,-5d/6,...,0,d/6,...,5d/6,d
. The choices of d
for m =
1, 2
and >2
are d=20, 10
and 6
, respectively.
The vector (b(d/6), b(2d/6), \dots, b(5d/6), s(0), s(d/6), \dots,
s(5d/6))
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 \tau =
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
.
Value
The vector (b(d/6), b(2d/6), \dots, b(5d/6), s(0), s(d/6),
\dots, s(5d/6))
that specifies the Kabaila & Giri (2009) CIUUPI, with
minimum coverage 1 - alpha
.
References
Kabaila, P. and Giri, R. (2009). Confidence intervals in regression utilizing prior information. Journal of Statistical Planning and Inference, 139, 3419-3429.
See Also
Examples
# 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 at x
Description
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
.
Usage
bsspline2(x, bsvec, alpha, m, natural = 1)
Arguments
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
|
Details
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 t
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
[-d,d]
are specified by the vector (b(d/6), b(2d/6), \dots,
b(5d/6), s(0), s(d/6), \dots, s(5d/6))
as follows. By assumption,
b(0)=0
and b(-i)=-b(i)
and s(-i)=s(i)
for
i=d/6,...,d
. The values of b(x)
and s(x)
for any x
in the interval [-d,d]
are found using cubic spline interpolation for
the given values of b(i)
and s(i)
for
i=-d,-5d/6,...,0,d/6,...,5d/6,d
. The choices of d
for m =
1, 2
and >2
are d=20, 10
and 6
respectively.
The vector (b(d/6), b(2d/6), \dots, b(5d/6), s(0), s(d/6), \dots,
s(5d/6))
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
.
Value
A data frame containing x
and the corresponding values of the
functions b and s.
References
Kabaila, P. and Giri, R. (2009). Confidence intervals in regression utilizing prior information. Journal of Statistical Planning and Inference, 139, 3419-3429.
See Also
Examples
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 confidence interval
Description
Compute the usual 1 - alpha
confidence interval
Usage
cistandard2(X, a, y, alpha)
Arguments
X |
A known |
a |
A |
y |
The |
alpha |
1 - |
Details
Suppose that
Y = X \beta + \epsilon
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 independent and identically normally distributed with zero mean and
unknown variance. The parameter of interest is \theta =
a
'
\beta
, where a
is a specified p
-vector.
Then cistandard2
computes the usual 1 - alpha
confidence interval for \theta
,
for given n
-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 y
= (-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 X
and the vector a
(denoted in
R by a.vec) are entered into R using the commands
in the following example.
Value
The usual 1 - alpha
confidence interval.
References
Kabaila, P. and Giri, K. (2009) Confidence intervals in regression utilizing prior information. Journal of Statistical Planning and Inference, 139, 3419 - 3429.
See Also
Examples
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 & Giri (2009) CIUUPI
Description
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.
Usage
ciuupi2(alpha, X, a, c, bsvec, t, y, natural = 1)
Arguments
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
|
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 a random n
-vector with components
that are independent and identically normally distributed with zero mean and
unknown variance. The parameter of interest is \theta =
a
'
\beta
. The uncertain prior information is that \tau =
c
'
\beta
takes the value t
, where a
and c
are
specified linearly independent vectors nonzero p
-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 \theta
that utilizes the uncertain prior information that
\tau
= t
for given n
-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 y
= (-1.3, 0.8, 2.6, 5.8, 0.3, 1.3, 4.3, 5.0, -0.4, 1.0,
5.2, 6.2).
Value
The Kabaila & Giri (2009) confidence interval, with minimum coverage 1
- alpha
, that utilizes the uncertain prior information.
References
Kabaila, P. and Giri, K. (2009) Confidence intervals in regression utilizing prior information. Journal of Statistical Planning and Inference, 139, 3419 - 3429.
See Also
Examples
# 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).
Compute the coverage probability of the Kabaila & Giri (2009) CIUUPI
Description
Evaluate the coverage probability of the Kabaila & Giri (2009) confidence
interval that utilizes uncertain prior information (CIUUPI),
with minimum coverage 1 - alpha
, at gam
.
Usage
cpciuupi2(gam, bsvec, alpha, m, rho, natural = 1)
Arguments
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
|
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 a random n
-vector with
components that are independent and identically normally distributed with
zero mean and unknown variance. The parameter of interest is \theta =
a
' \beta
. The uncertain prior information is that \tau =
c
' \beta
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 \theta
and \tau
. It is determined by the n
by p
design matrix X and the p
-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
.
Value
The value(s) of the coverage probability of the Kabaila & Giri (2009)
CIUUPI at gam
.
References
Kabaila, P. and Giri, K. (2009) Confidence intervals in regression utilizing prior information. Journal of Statistical Planning and Inference, 139, 3419 - 3429.
See Also
Examples
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 rho
Description
Find the correlation rho for given n
by p
design matrix X and
given p
-vectors a and c
Usage
find_rho(X, a, c)
Arguments
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 |
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 a random n
-vector with
components that are independent and identically normally distributed with
zero mean and unknown variance. The parameter of interest is \theta =
a
' \beta
. The uncertain prior information is that \tau
=
c
' \beta
takes the value t
, where a
and
c
are specified linearly independent nonzero p
-vectors and
t
is a specified number. rho
is the known correlation between
the least squares estimators of \theta
and \tau
. It is
determined by the n
by p
design matrix X and the
p
-vectors a and c.
Value
The value of the correlation rho.
X
, a
and c
for a particular example
Consider
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, X
is a 12 x 4 matrix, \beta
is an unknown
parameter 4-vector and \epsilon
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
y
is n
= 12 and the length of the parameter vector \beta
is p
= 4, so that m = n - p
= 8. The parameter of interest is
\theta =
a
' \beta
, where the column vector a
=
(0, 2, 0, -2). Also, the parameter \tau =
c
' \beta
,
where the column vector c
= (0, 0, 0, 1). The uncertain prior
information is that \tau =
t
, where t
= 0.
The design matrix X
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.
References
Kabaila, P. and Giri, R. (2009). Confidence intervals in regression utilizing prior information. Journal of Statistical Planning and Inference, 139, 3419-3429.
Examples
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
Compute the first definition of the scaled expected length of the Kabaila & Giri (2009) CIUUPI
Description
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
.
Usage
sel1ciuupi2(gam, bsvec, alpha, m, rho, natural = 1)
Arguments
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
|
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 a random n
-vector with components
that are independent and identically normally distributed with zero mean and
unknown variance. The parameter of interest is \theta =
a
'
\beta
. The uncertain prior information is that \tau =
c
'
\beta
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
\theta
and \tau
. It is determined by the n
by p
design
matrix X and the p
-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
.
Value
The value(s) of the first definition of the scaled expected length of
the Kabaila & Giri (2009) CIUUPI at gam
.
References
Kabaila, P. and Giri, K. (2009) Confidence intervals in regression utilizing prior information. Journal of Statistical Planning and Inference, 139, 3419 - 3429.
See Also
Examples
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)
Compute the second definition of the scaled expected length of the Kabaila & Giri (2009) CIUUPI
Description
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
.
Usage
sel2ciuupi2(gam, bsvec, alpha, m, rho, natural = 1)
Arguments
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
|
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 a random n
-vector with components
that are independent and identically normally distributed with zero mean and
unknown variance. The parameter of interest is \theta =
a
'
\beta
. The uncertain prior information is that \tau =
c
'
\beta
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
\theta
and \tau
. It is determined by the n
by p
design
matrix X and the p
-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
.
Value
The value(s) of the second definition of the scaled expected length of
the Kabaila & Giri (2009) CIUUPI at gam
.
References
Kabaila, P. and Giri, K. (2009) Confidence intervals in regression utilizing prior information. Journal of Statistical Planning and Inference, 139, 3419 - 3429.
See Also
Examples
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)