equicorr: Create an equicorrelated matrix

Description Usage Arguments Value

View source: R/equicorr.R

Description

Create an correlation matrix in which all off-diagonal elements are equal,

\begin{bmatrix} 1 & ρ & … & rho \\ ρ & 1 & … & rho \\ \vdots & \vdots & \ddots & \vdots \\ ρ & ρ & … & 1 \end{bmatrix}

Usage

1
equicorr(k, rho = 0, scale = NULL)

Arguments

k

An integer with the matrix dimension.

rho

The correlation coefficient for off-diagonal entries.

scale

If NULL a correlation matrix is returned. If a vector of standard deviations, then a covariance matrix is returned.

Value

A correlation or covariance matrix (if scale is not-null).


jrnold/rubbish documentation built on May 20, 2019, 2:05 a.m.