Generating time series data in EViews 7

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

ssantic
Posts: 6
Joined: Mon Jun 17, 2013 8:12 am

Generating time series data in EViews 7

Postby ssantic » Mon Jun 17, 2013 8:29 am

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?

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13584
Joined: Tue Sep 16, 2008 5:38 pm

Re: Generating time series data in EViews 7

Postby EViews Gareth » Mon Jun 17, 2013 8:59 am

I don't see Xt anywhere in your example program.

startz
Non-normality and collinearity are NOT problems!
Posts: 3796
Joined: Wed Sep 17, 2008 2:25 pm

Re: Generating time series data in EViews 7

Postby startz » Mon Jun 17, 2013 10:38 am

Change

Code: Select all

smpl 2 201
to

Code: Select all

smpl 3 201

ssantic
Posts: 6
Joined: Mon Jun 17, 2013 8:12 am

Re: Generating time series data in EViews 7

Postby ssantic » Mon Jun 17, 2013 11:37 pm

Thanks! That solved it!


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 1 guest