Unlimited learning, half price | 50% off

Last chance! 50% off unlimited learning

Sale ends in


fastmatrix (version 0.5-7721)

corAR1: AR(1) correlation structure

Description

This function is a constructor for the corAR1 correlation matrix representing an autocorrelation structure of order 1.

Usage

corAR1(rho, p = 2)

Value

Returns a p by p matrix.

Arguments

rho

the value of the lag 1 autocorrelation, which must be between -1 and 1.

p

dimension of the requested correlation matrix.

Examples

Run this code
R <- corAR1(rho = 0.8, p = 5)

Run the code above in your browser using DataLab