Description Usage Arguments Details Value X, a and c for a particular example References Examples
Find the correlation rho for given n by p design matrix X and given p-vectors a and c
1 |
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 |
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.
The value of the correlation rho.
a
and c
for a particular exampleConsider
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.
Kabaila, P. and Giri, R. (2009). Confidence intervals in regression utilizing prior information. Journal of Statistical Planning and Inference, 139, 3419-3429.
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
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.