Page 1 of 1

AR(1) ARMA(1,0)

Posted: Sat Apr 23, 2011 3:20 pm
by Tartaglia
Hi everyone,

I generated a sample of 500 standard nomally distributed random variables, Z_t, and now I am trying to generate the following process:

X_t=0.8X(-1)-1+Z_t

Before, I have already generated a MA(2) process with series:

series Y_t=Z+2*Z_t(-1)+Z_t(-2)

and I tried to proceed in a similar fashion for X_t:

series X_t=0.8X(-1)-1+Z_t

However all the entries are empty. I have created the process X_t in Matlab already without problems, but here it does not seem to work.

Can anyone help?

Thank you,
Tartaglia

AR(1) ARMA(1,0)

Posted: Sat Apr 23, 2011 3:46 pm
by EViews Gareth
Did you set the first value of X to a seed value?

Re: AR(1) ARMA(1,0)

Posted: Sat Apr 23, 2011 4:07 pm
by Tartaglia
I did not, do you mean to set X_0 equal to 0 (or a random value)?

AR(1) ARMA(1,0)

Posted: Sat Apr 23, 2011 4:14 pm
by EViews Gareth
Indeed.

Re: AR(1) ARMA(1,0)

Posted: Sat Apr 23, 2011 4:20 pm
by Tartaglia
I am not quite sure how to do that, since X does not exist yet.

Re: AR(1) ARMA(1,0)

Posted: Sat Apr 23, 2011 4:30 pm
by Tartaglia
I just tried to fill the whole series with zeros and set the first value to 1, using
series X_tc=0
X_tc.fill(l) 1 2

which gives me a whole series full of zeros, and an error message, that there is a syntax error in the 'fill' line.

Re: AR(1) ARMA(1,0)

Posted: Sat Apr 23, 2011 4:43 pm
by Tartaglia
I just tried the following commands:

series X_tc=0
series X_tc(+1)=0.8*X_tc+Z_t

which seemed to work as far as creating the series. Does this represent my actual series though?

Re: AR(1) ARMA(1,0)

Posted: Sat Apr 23, 2011 4:54 pm
by EViews Gareth
The standard way to do it would be this:

Code: Select all

series x_tc = 0 smpl @first+1 @last x_tc = 0.8*x_tc(-1) + z_t smpl @all

Re: AR(1) ARMA(1,0)

Posted: Sat Apr 23, 2011 5:04 pm
by Tartaglia
I see. would both approaches give me the same result (I just plotted both and they look very similar).

AR(1) ARMA(1,0)

Posted: Sat Apr 23, 2011 5:21 pm
by EViews Gareth
With yours, xt depends on the lagged values of zt.

Re: AR(1) ARMA(1,0)

Posted: Sat Apr 23, 2011 5:32 pm
by Tartaglia
Oh of course, I missed that (getting late here), thanks so much for your quick help!!