Learn R Programming

dae (version 3.2.30)

mat.corg: Forms a general correlation matrix

Description

Form the correlation matrix of order order for which all correlations potentially differ.

Usage

mat.corg(rhos, order, byrow = FALSE)

Value

A correlation matrix.

Arguments

rhos

A numeric containing the p(p -1)/2 correlation values ordered either by columns (if byrow is FALSE) or by rows (if byrow is TRUE).

order

The order of the correlation matrix to be formed.

byrow

A logical. If FALSE the lower-traingle of the matrix is filled by columns, otherwise the the ower triangle is filled by rows.

Author

Chris Brien

See Also

mat.I, mat.J, mat.cor, mat.banded, mat.exp, mat.gau, mat.ar1, mat.ar2, mat.sar2, mat.ma1, mat.ma2, mat.arma

Examples

Run this code
    corr <- mat.corg(rhos = c(0.4, 0.2, 0.1), order = 3)

Run the code above in your browser using DataLab