Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: Stata Code for arma processes


From   Kit Baum <[email protected]>
To   "Ozuna, Teofilo" <[email protected]>
Subject   st: Re: Stata Code for arma processes
Date   Mon, 16 Aug 2004 10:23:15 -0400

Dear Prof. Ozuna

I would just suggest starting from first principles, as one would in performing a Monte Carlo experiment, and writing the data generating process. E.g. for an AR(2) model, one can just do

clear
set obs 1000
g t = _n
tsset t
* AR(2)
g eps1 = invnorm(uniform())
scalar theta0= 100
scalar theta1= 0.6
scalar theta2= -0.3
g double ar2 = 0
qui replace ar2 in 3/l = theta0 + theta1*L.ar2 + theta2*L2.ar2 + eps1
su
* should reproduce the parameters of the model (arima not needed for pure AR)
reg ar2 L(1/2).ar2

Any ARMA DGP can be set up this way. ARCH is a bit trickier, but can be done in a similar fashion.

Thanks
Kit Baum
Boston College Economics

On Aug 15, 2004, at 1:11 PM, Ozuna, Teofilo wrote:


Dear Professor Baum:

Do you have or know of STATA codes that generate data for an AR(2), MA(2), ARMA (2,2) and ARCH processes. I want to have my students generate data of this type and then have them estimate various models using these data process. I want to thank you in advance for your help in this regard.

Dr. Teo Ozuna
Associate Dean
College of Business Administration
The University of Texas-Pan American
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index