Learn R Programming

StratSel (version 1.4)

fetch.rho.v: 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)

Value

Returns the correct variance estimate for the estimate of the correlation coefficient \(\rho\).

Arguments

v

Variance-covariance matrix based on the regular parameters (\(\beta\)) and \(\theta\).

b

Coefficient vector, first \(n\) elements are for the regular parameter estimates and the last element is \(\theta\).

Author

Lucas Leemann lleemann@gmail.com

Details

This function is for internal use but documented as a regular function to enable any user to assess the estimator and its functionality.

See Also

StratSel

Examples

Run this code
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))

Run the code above in your browser using DataLab