fetch.rho.v {StratSel} | R Documentation |
Function to transform var(\theta)
back to var(\rho)
Description
The model has a correlation parameter which is estimated and theoretically bound between -1 and +1. To ensure that the estimated parameters are within the theoretical bounds a transformation is necessary. The chosen transformation is:
f(\rho): \rho = \frac{2}{(1-exp(-\theta))}- 1
Whereas \rho
is the actual correlation coefficient and \theta
is the parameter we estimate in the model. This parametrization has been worked into the likelihood function and ensures that \rho
will be between -1
and +1
.
The variance covariance matrix thus contains entries based on \theta
but not \rho
. Hence, this function takes the variance of the transformed correlation parameter (\theta
) and produces the value correct for \rho
.
To create the correct measure of var(\rho)
this function simulates 1,000 \theta
's and then transforms them to \rho
's. The variance of these \rho
's is then reported. Note, this means that the variance-covariance returned by StratSel
is only correct for all diagonals and off-diagonals for the parameters (\beta
) but for the correlation coefficient only the variance is correct. Given that there is no reason to use the full variance-covariance for post-estimation commands this is not a problem.
Usage
fetch.rho.v(v, b)
Arguments
v |
Variance-covariance matrix based on the regular parameters ( |
b |
Coefficient vector, first |
Details
This function is for internal use but documented as a regular function to enable any user to assess the estimator and its functionality.
Value
Returns the correct variance estimate for the estimate of the correlation coefficient \rho
.
Author(s)
Lucas Leemann lleemann@gmail.com
See Also
Examples
fetch.rho.v(matrix(c(1,0,0,1),2,2),c(0,0))
fetch.rho.v(matrix(c(1,0,0,2),2,2),c(0,0))