find_rho: Find rho

Description Usage Arguments Details Value X, a and c for a particular example References Examples

View source: R/find_rho.R

Description

Find the correlation rho for given n by p design matrix X and given p-vectors a and c

Usage

1
find_rho(X, a, c)

Arguments

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

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 nonzero p-vectors and t is a specified number. rho is the known correlation between the least squares estimators of θ and τ. 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, β 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 y is n = 12 and the length of the parameter vector β is p = 4, so that m = n - p = 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 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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
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

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