m=sim.dregar(n=500 , beta=1:4, phi=generateAR(2), theta=.3,
n.z.coeffs=3 , plot=TRUE) # generating data
r=dregar(data = m$rawdata,da = 1:2,ar = 1,mselection = 4,penalized = 1)# estimating parameters
round(cbind(
true = c(phi=m$phi,theta=m$theta,beta=m$beta),
estimates = c(phi=r$phi,theta=r$theta,beta=r$beta)
)
,3
)
Run the code above in your browser using DataLab