ciuupi2: Compute the Kabaila & Giri (2009) CIUUPI

Description Usage Arguments Details Value References See Also Examples

View source: R/ciuupi2.R

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

1
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 n by p 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 τ = t

y

The n-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 β + ε

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 a random n-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 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 θ that utilizes the uncertain prior information that τ = 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

find_rho, bsciuupi2

Examples

 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
31
32
33
34
35
36
37
# 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).

ciuupi2 documentation built on March 11, 2021, 5:06 p.m.