Learn R Programming

avar (version 0.1.3)

covmat_ar1blocks: Calculate Theoretical Covariance Matrix of AR(1) Blocks Process

Description

This function allows us to calculate the theoretical covariance matrix of a non-stationary AR(1) blocks process.

Usage

covmat_ar1blocks(n_total, n_block, phi, sigma2)

Value

The theoretical covariance matrix of the AR(1) blocks process.

Arguments

n_total

An integer indicating the length of the whole AR(1) blocks process.

n_block

An integer indicating the length of each block of the AR(1) blocks process.

phi

A double value for the autocorrection parameter \(\phi\).

sigma2

A double value for the variance parameter \(\sigma ^2\).

Author

Yuming Zhang

Examples

Run this code
covmat1 = covmat_ar1blocks(n_total = 1000, n_block = 10,
phi = 0.9, sigma2 = 1)
covmat2 = covmat_ar1blocks(n_total = 800, n_block = 20,
phi = 0.5, sigma2 = 2)

Run the code above in your browser using DataLab