simulAR1 {G1DBN}R Documentation

First order multivariate Auto-Regressive process generation

Description

This function generates multivariate time series according to the following first order Auto-Regressive process,

X(t)= A X(t-1) + B + e(t),

where matrix A has size p x p and arrays X(t), B and e(t) have length p. e(t) follows a zero-centered multivariate gaussian distribution whose variance matrix S is diagonal. First, matrix A, array B and diagonal of S are randomly generated. Each diagonal term S[i,i] is uniformly generated from U([minSig,maxSig]). The elements of matrix A and array B are uniformly generated from U([-maxA,-minA],[minA,maxA]) and U([minB,maxB]) respectively. Second, the time series data are generated according the so defined AR(1) model.

Usage

out<-simulAR1(p,n,edgeProp,minA,maxA,minB,maxB,minSig,maxSig)

Arguments

p the desired dimension of the multivariate time series.
n the desired length of the time serie.
edgeProp the desired proportion of non zero coefficient in the AR transition matrix.
minA the minimum value for matrix A elements generation.
maxA the maximum value for matrix A elements generation.
minB the minimum value for matrix B elements generation.
maxB the maximum value for matrix B elements generation.
minSig the minimum value for the diagonal of covariance matrix S generation.
maxSig the maximum value for the diagonal of covariance matrix S generation.

Value

A list with out$data a matrix, with n rows (=length) and p columns (=dimension), containing the generated time series, out$A the AR generated matrix A (p x p), out$B the AR generated vector B (p), out$sig the generated diagonal (p) of covariance matrix S.

Author(s)

Lebre Sophie (http://stat.genopole.cnrs.fr/~slebre).

Examples

#generate AR(1) time series 
AR<-simulAR1(p=10,n=50,edgeProp=0.02,minA=0.5,maxA=1.5,minB=0,maxB=1,minSig=0.1,maxSig=0.8)

[Package G1DBN version 1.01 Index]