Description Usage Arguments Details Value Examples

Convert between representations of (co-)variance structures (EXPERIMENTAL). See source code for details.

1 2 3 4 5 6 7 8 9 |

`L` |
List of symmetric, upper-triangular, or lower-triangular square matrices. |

`v` |
Concatenated vector containing the elements of the lower-triangle (including the diagonal) of a symmetric or triangular matrix. |

`n` |
Number of rows (and columns) of the resulting matrix. |

`symm` |
Return symmetric matrix if |

`m` |
Standard deviation-correlation matrix. |

`V` |
Covariance matrix. |

`s` |
Scale parameter. |

`mlist2vec`

Convert list of matrices to concatenated vector of lower triangles with an attribute that gives the dimension of each matrix in the original list. This attribute may be used to reconstruct the matrices. Returns a concatenation of the elements in one triangle of each matrix. An attribute`"clen"`

gives the dimension of each matrix.`vec2mlist`

Convert concatenated vector to list of matrices (lower triangle or symmetric). These matrices could represent Cholesky factors, covariance matrices, or correlation matrices (with standard deviations on the diagonal).`vec2STlist`

Convert concatenated vector to list of ST matrices.`sdcor2cov`

Standard deviation-correlation matrix to covariance matrix convert 'sdcor' format (std dev on diagonal, cor on off-diag) to and from variance-covariance matrix.`cov2sdcor`

Covariance matrix to standard deviation-correlation matrix (i.e. standard deviations on the diagonal and correlations off the diagonal).`Vv_to_Cv`

Variance-covariance to relative covariance factor. Returns a vector of elements from the lower triangle of a relative covariance factor.`Sv_to_Cv`

Standard-deviation-correlation to relative covariance factor. Returns a vector of elements from the lower triangle of a relative covariance factor.`Cv_to_Vv`

Relative covariance factor to variance-covariance. From unscaled Cholesky vector to (possibly scaled) variance-covariance vector. Returns a vector of elements from the lower triangle of a variance-covariance matrix.`Cv_to_Sv`

Relative covariance factor to standard-deviation-correlation. From unscaled Chol to sd-cor vector. Returns a vector of elements from the lower triangle of a standard-deviation-correlation matrix.

(Co-)variance structure

1 2 |

```
Loading required package: Matrix
$`1`
[,1] [,2] [,3]
[1,] 1 2 3
[2,] 2 4 5
[3,] 3 5 6
11 12 13 14 15 16
1 2 3 4 5 6
attr(,"clen")
1
3
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.