Learn R Programming

CepReg (version 0.1.3)

generate_sig: Generate Exponential Correlation Covariance Matrix

Description

Creates an n × n covariance matrix with entries \(\rho^{|i - j|}\).

Usage

generate_sig(n, rho)

Value

An n × n positive definite covariance matrix.

Arguments

n

Dimension of the covariance matrix.

rho

Correlation decay parameter.

Examples

Run this code
S <- generate_sig(5, 0.5)


Run the code above in your browser using DataLab