Learn R Programming

CVTuningCov (version 1.0)

AR1: Covariance Matrix with AR(1) Structure

Description

Generate Covariance Matrix with an Autoregression (1) Structrue

Usage

AR1(p,rho=0.5)

Arguments

p
the dimension of a covariance matrix.
rho
the default value is 0.5.

Value

a p*p matrix.

Examples

Run this code
p <- 5;
Sigma <- AR1(p, rho=0.9);
Sigma;

Run the code above in your browser using DataLab