Page 1 of 1

Generating time series data in EViews 7

Posted: Mon Jun 17, 2013 8:29 am
by ssantic
Hello!

I need to randomly generate some time series data using EViews. They are as follows:

1) Xt = 0.2 - 0.6 Xt-1 + 0.3 Xt-2 + et
Yt = 0.2 + 0.6 Yt-1 - 0.3 Yt-2 + et
(sample size 400, the beginning values are to be set to zero, and et is N(0,1))

2) A trend-stationary time series with the specification:
Xt = 1.2 + 0.04t + et
(sample size 400)

I've been given the following example code for similar series:

workfile example1 u 1 201
series e = 0
series AR1=0
series AR2=0
series AR3=0
series AR4=0

rndseed 301
series e = nrnd

smpl 2 201
ar1 = 0.4*ar1(-1)+e
ar2 = -0.4*ar2(-1)+e
ar3 = 0.9*ar3(-1)+e
ar4 = -0.9*ar4(-1)+e


But, if I try, for example, this command: Xt = 0.2 - 0.6*Xt(-1) + 0.3*Xt(-2) I get all NAs (the second lag is the problem).

Can anyone please help me out?

Re: Generating time series data in EViews 7

Posted: Mon Jun 17, 2013 8:59 am
by EViews Gareth
I don't see Xt anywhere in your example program.

Re: Generating time series data in EViews 7

Posted: Mon Jun 17, 2013 10:38 am
by startz
Change

Code: Select all

smpl 2 201
to

Code: Select all

smpl 3 201

Re: Generating time series data in EViews 7

Posted: Mon Jun 17, 2013 11:37 pm
by ssantic
Thanks! That solved it!