find_rho {ciuupi2} | R Documentation |
Find rho
Description
Find the correlation rho for given by
design matrix X and
given
-vectors a and c
Usage
find_rho(X, a, c)
Arguments
X |
The |
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
where is a random
-vector of responses,
is a known
by
matrix
with linearly independent columns,
is an unknown parameter
-vector and
is a random
-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 -vectors and
t
is a specified number. rho
is the known correlation between
the least squares estimators of and
. It is
determined by the
by
design matrix X and the
-vectors a and c.
Value
The value of the correlation rho.
, 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, 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
is
= 12 and the length of the parameter vector
is
= 4, so that
= 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 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