| acX_to_rho {ciuupi} | R Documentation |
Computes the known correlation \rho
between \widehat{\theta} and \widehat{\tau} from the
p-vectors
a and c and the
design matrix X
Description
Computes the known correlation \rho
between \widehat{\theta}
and \widehat{\tau}. This correlation is computed from the
p-vectors
a and c and the n \times p
design matrix X, with linearly independent columns, using the formula
\rho=a^{\top}(X^{\top} X)^{-1} c
/(v_{\theta} \, v_{\tau})^{1/2}, where
v_{\theta}
=a^{\top}(X^{\top} X)^{-1}a and
v_{\tau}
=c^{\top}(X^{\top} X)^{-1}c.
Usage
acX_to_rho(a, c, X)
Arguments
a |
The |
c |
The |
X |
The |
Value
The known correlation \rho between \widehat{\theta}
and \widehat{\tau}.
Examples
a <- c(0, 2, 0, -2)
c <- c(0, 0, 0, 1)
x1 <- c(-1, 1, -1, 1)
x2 <- c(-1, -1, 1, 1)
X <- cbind(rep(1, 4), x1, x2, x1*x2)
rho <- acX_to_rho(a, c, X)
print(rho)
[Package ciuupi version 1.2.3 Index]