ARgenerate: Generate a unit AR(1) covariance matrix

Description Usage Arguments Value See Also Examples

View source: R/matrixutils.R

Description

generate AR(1) correlation matrices

Usage

1
ARgenerate(n, rho)

Arguments

n

number of columns/rows

rho

correlation parameter

Value

Toeplitz n * n matrix with 1 on the diagonal and rho^k on the other diagonals, where k is distance from the main diagonal. Used internally but it is useful for generating your own random matrices.

See Also

stats::toeplitz()

Examples

1
ARgenerate(6, .9)

MixMatrix documentation built on Nov. 16, 2021, 9:25 a.m.