| makeparma {perARMA} | R Documentation |
Simulation of PARMA sequence
Description
Procedures makeparma and makepar enable to construct PARMA and PAR 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)
makepar(n, phi, del, nprep)
Arguments
n |
length of simulated series. |
phi |
matrix of size |
theta |
matrix of size |
del |
vector of length |
nprep |
number of periods of simulated output; for |
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.
Value
PARMA or PAR sequence returned as y.
Author(s)
Harry Hurd
See Also
Examples
##################### simulation of PARMA(2,1)
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)
PARMA21<-makeparma(nlen,phi0,theta0,del0)
parma<-PARMA21$y
plot(ts(parma))
##################### simulation of PAR(2)
T=24
nlen=1000
p=2
a=matrix(0,T,p)
a[1,1]=.5
a[2,2]=.4
phia<-ab2phth(a)
phi0=phia$phi
phi0=as.matrix(phi0)
del0=matrix(1,T,1)
PAR1<-makepar(nlen,phi0,del0)
par<-PAR1$y
plot(ts(par))