Package 'ciuupi2'

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

Help Index


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 - alpha

m

Degrees of freedom n - p

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β+ϵy = X \beta + \epsilon

where yy is a random nn-vector of responses, XX is a known nn by pp matrix with linearly independent columns, β\beta is an unknown parameter pp-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 pp-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 nn by pp design matrix X and the pp-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α/21 - \alpha/2 quantile of the tt 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][-d,d] are specified by the vectors (b(d/6),b(2d/6),,b(5d/6))(b(d/6), b(2d/6), \dots, b(5d/6)) and (s(0),s(d/6),,s(5d/6))(s(0), s(d/6), \dots, s(5d/6)) as follows. By assumption, b(0)=0b(0)=0 and b(i)=b(i)b(-i)=-b(i) and s(i)=s(i)s(-i)=s(i) for i=d/6,...,di=d/6,...,d. The values of b(x)b(x) and s(x)s(x) for any xx in the interval [d,d][-d,d] are found using cube spline interpolation for the given values of b(i)b(i) and s(i)s(i) for i=d,5d/6,...,0,d/6,...,5d/6,di=-d,-5d/6,...,0,d/6,...,5d/6,d. The choices of dd for m=1,2m = 1, 2 and >2>2 are d=20,10d=20, 10 and 66, respectively.

The vector (b(d/6),b(2d/6),,b(5d/6),s(0),s(d/6),,s(5d/6))(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),,b(5d/6),s(0),s(d/6),,s(5d/6))(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

find_rho

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 (b(d/6),b(2d/6),,b(5d/6),s(0),s(d/6),,s(5d/6))(b(d/6), b(2d/6), \dots, b(5d/6), s(0), s(d/6), \dots, s(5d/6)) computed using bsciuupi2

alpha

The minimum coverage probability is 1 - alpha

m

Degrees of freedom n - p

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 bsciuupi2

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α/21 - \alpha/2 quantile of the tt 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][-d,d] are specified by the vector (b(d/6),b(2d/6),,b(5d/6),s(0),s(d/6),,s(5d/6))(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)=0b(0)=0 and b(i)=b(i)b(-i)=-b(i) and s(i)=s(i)s(-i)=s(i) for i=d/6,...,di=d/6,...,d. The values of b(x)b(x) and s(x)s(x) for any xx in the interval [d,d][-d,d] are found using cubic spline interpolation for the given values of b(i)b(i) and s(i)s(i) for i=d,5d/6,...,0,d/6,...,5d/6,di=-d,-5d/6,...,0,d/6,...,5d/6,d. The choices of dd for m=1,2m = 1, 2 and >2>2 are d=20,10d=20, 10 and 66 respectively.

The vector (b(d/6),b(2d/6),,b(5d/6),s(0),s(d/6),,s(5d/6))(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

find_rho, bsciuupi2

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 nn by pp matrix

a

A pp-vector used to specify the parameter of interest

y

The nn-vector of observed responses

alpha

1 - alpha is the coverage probability of the confidence interval

Details

Suppose that

Y=Xβ+ϵY = X \beta + \epsilon

is a random nn-vector of responses, XX is a known nn by pp matrix with linearly independent columns, β\beta is an unknown parameter pp-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 pp-vector. Then cistandard2 computes the usual 1 - alpha confidence interval for θ\theta, for given nn-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 yy = (-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 XX 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

find_rho

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 - alpha is the minimum coverage probability of the confidence interval

X

The nn by pp design matrix

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 bsciuupi2

t

A number used to specify the uncertain prior information, which has the form τ=\tau = t

y

The nn-vector of observed responses

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 bsciuupi2

Details

Suppose that

y=Xβ+ϵy = X \beta + \epsilon

where yy is a random nn-vector of responses, XX is a known nn by pp matrix with linearly independent columns, β\beta is an unknown parameter pp-vector and ϵ\epsilon is a random nn-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 pp-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 nn-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 yy = (-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

find_rho, bsciuupi2

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 bsciuupi2

alpha

The minimum coverage probability is 1 - alpha

m

Degrees of freedom n - p

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 bsciuupi2

Details

Suppose that

y=Xβ+ϵy = X \beta + \epsilon

where yy is a random nn-vector of responses, XX is a known nn by pp matrix with linearly independent columns, β\beta is an unknown parameter pp-vector and ϵ\epsilon is a random nn-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 nn by pp design matrix X and the pp-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

find_rho, bsciuupi2

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 nn by pp design matrix X and given pp-vectors a and c

Usage

find_rho(X, a, c)

Arguments

X

The nn by pp design matrix

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β+ϵy = X \beta + \epsilon

where yy is a random nn-vector of responses, XX is a known nn by pp matrix with linearly independent columns, β\beta is an unknown parameter pp-vector and ϵ\epsilon is a random nn-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 pp-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 nn by pp design matrix X and the pp-vectors a and c.

Value

The value of the correlation rho.

XX, 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, XX 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 yy is nn = 12 and the length of the parameter vector β\beta is pp = 4, so that m=npm = 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 XX 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 bsciuupi2

alpha

The minimum coverage probability is 1 - alpha

m

Degrees of freedom n - p

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 bsciuupi2

Details

Suppose that

y=Xβ+ϵy = X \beta + \epsilon

where yy is a random nn-vector of responses, XX is a known nn by pp matrix with linearly independent columns, β\beta is an unknown parameter pp-vector and ϵ\epsilon is a random nn-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 nn by pp design matrix X and the pp-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

find_rho, bsciuupi2

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 bsciuupi2

alpha

The minimum coverage probability is 1 - alpha

m

Degrees of freedom n - p

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 bsciuupi2

Details

Suppose that

y=Xβ+ϵy = X \beta + \epsilon

where yy is a random nn-vector of responses, XX is a known nn by pp matrix with linearly independent columns, β\beta is an unknown parameter pp-vector and ϵ\epsilon is a random nn-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 nn by pp design matrix X and the pp-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

find_rho, bsciuupi2

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)