Learn R Programming

perARMA (version 1.3)

makeparma: Simulation of PARMA sequence

Description

Procedure makeparma enables to construct PARMA type sequence of length n according to inputed matrices phi, theta, del. The optional parameter nprep defines the number of periods of simulated output y that will be discarded to let the start-up transients settle.

Usage

makeparma(n, phi, theta, del, nprep)

Arguments

n
length of simulated series.
phi
matrix of size $T \times p$ containing periodic AR parameters.
theta
matrix of size $T \times q$ containing periodic MA parameters.
del
vector of length $T$ containing the periodic sigmas (shock weights), which are sometimes denoted also as $\sigma(t)$ or as $\theta_{0}(t)$.
nprep
number of periods of simulated output; for p>0 the computation of new y values depends on old ones through the autoregressive part. Starting a PARMA with the assumption that old values of y are equal to zero caus

Value

  • PARMA sequence returned as y.

Details

A vector $\xi(t)$ of independent $N(0,1)$ variates is generated by the standard random number generator rnorm. This vector series is filtered by parmafil, which parameters are set by phi, theta and del, to generate the filtered series (pre-iterates and the n desired data). The last n data of the filtered series are output in the vector y.

See Also

parmafil

Examples

Run this code
T=12
nlen=480
p=2
 a=matrix(0,T,p)
q=1
 b=matrix(0,T,q)

a[1,1]=.8                 
a[2,1]=.3                                     
phia<-ab2phth(a) 
phi0=phia$phi         
phi0=as.matrix(phi0)       
      
b[1,1]=-.7	          
b[2,1]=-.6                  
thetab<-ab2phth(b)         
theta0=thetab$phi  
theta0=as.matrix(theta0) 

del0=matrix(1,T,1)       

makeparma(nlen,phi0,theta0,del0)

Run the code above in your browser using DataLab