find_rho {ciuupi2}R Documentation

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


[Package ciuupi2 version 1.0.1 Index]