Calculates correlations from variances and covariances, together with their variances and covariances (S.A. Gezan).
Options
PRINT = string token |
Output required (summary); default summ |
|---|---|
IVARIANCES = variate |
Indexes of the two variances in the ESTIMATES variate; no default – must be set |
ICOVARIANCE = scalar |
Index of the covariance in the ESTIMATES variate; no default – must be set |
Parameters
ESTIMATES = variates |
Estimated values of the variances and covariances |
|---|---|
VCOVARIANCE = symmetric matrices |
Variance-covariance matrix of the variances and covariances |
FUNCTIONESTIMATE = scalars |
Saves the estimated value of the function |
SE = scalars |
Saves the standard error of the function estimate |
NEWESTIMATES = variates |
Saves new vectors of estimates, including the estimated value of the function |
NEWVCOVARIANCE = symmetric matrices |
Saves variance-covariance matrices for the new vectors (including the function estimate) |
Description
FNCORRELATION estimates correlations from variances and covariances. The estimated values of the variances and covariances, are contained in a variate supplied by the ESTIMATES parameter. The positions of the two variances in the ESTIMATES variate are specified (in a variate of length two) by the IVARIANCES option, and the position of the covariance is specified (in a scalar) by the ICOVARIANCES option. The variances and covariances of the ESTIMATES are supplied (in a symmetric matrix) by the VCOVARIANCE parameter.
The estimated correlation can be saved by the FUNCTIONESTIMATE parameter, and its standard error can be saved by the SE option (both in scalars). The NEWESTIMATES parameter can save a new variate of estimates, containing first the original ESTIMATES variate and then the function estimate. The corresponding variance-covariance matrix can be saved (in a symmetric matrix) by the NEWVCOVARIANCE parameter.
Options: PRINT, IVARIANCES, ICOVARIANCE.
Parameters: ESTIMATES, VCOVARIANCE, FUNCTIONESTIMATE, SE, NEWESTIMATES, NEWVCOVARIANCE.
Method
The correlation function w is calculated from the random variances f and g, and covariance h by the expression:
w = h / √( f × g )
The variance of the estimated correlation is approximated using a first-order Taylor series expansion (i.e. the delta method); see Holland (2006).
var(w) = var( h / sqrt( f × g ) )
= E(w)2 × { var(f) / (4 × E(f)2) + var(g) / (4 × E(g)2) + var(h) / E(h)2
+ cov(f,g) / (2 × E(f) × E(g)) – cov(f,h) / (E(f) × E(h)) – cov(h,g) / (E(h) × E(g))}
Reference
Holland, J.B. (2006). Estimating genotypic correlations and their standard errors using multivariate restricted maximum likelihood estimation with SAS Proc MIXED. Crop Sci., 46, 642-654.
See also
Procedures: FNLINEAR, FNPOWER.
Commands for: Calculations and manipulation.
Example
CAPTION 'FNCORRELATION example'; STYLE=meta
VARIATE [VALUES=4.01,19.63,13.65] est0
SYMMETRICMATRIX [ROWS=3; VALUES=150.40,-31.85,161.13,0.93,-9.32,23.31] vcov0
FNCORRELATION [PRINT=summary; IVARIANCES=!(2,3); ICOVARIANCE=!(1)]\
ESTIMATES=est0; VCOVARIANCE=vcov0; FUNCTIONESTIMATE=corr; SE=se;\
NEWESTIMATES=newest; NEWVCOVARIANCE=newvcov
PRINT corr,se
& newest,newvcov