Repeated variable input

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason

davey87
Posts: 24
Joined: Tue Feb 05, 2013 12:18 pm

Repeated variable input

Postby davey87 » Tue Feb 26, 2013 7:28 am

Hello,

I have another relatively simply question.

I have a series called p85to89fz1p in which I want to manually input values for. There are 30 values I need to input, however the last 24 are all the same.

For example, this is what I am trying to do:

smpl 2006 2036
p85to89fz1p=5,6,6,6,8,9,10,10,10...........................10

The first 6 values are different, then the last 24 are all 10's. Is there a way I can avoid typing "10" 24 times?

I know in AREMOS the command was:

ser<2006 2036>p85to89f=5,6,6,8,9,10,10,10 repeat *;

Where the "repeat" function inputted 10's until the end of the specified time series.

Is there a similar command in EViews?

Thanks

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

Re: Repeated variable input

Postby startz » Tue Feb 26, 2013 7:50 am

One workaround is

Code: Select all

smpl 2027 2036 p85to89fz1p = 10 smpl@all

davey87
Posts: 24
Joined: Tue Feb 05, 2013 12:18 pm

Re: Repeated variable input

Postby davey87 » Tue Feb 26, 2013 10:14 am

This worked fine for the 10's part of it.

I can't seem to find out how to manually input different values for the series though, i.e. the p85to89fz1p=5,6,6,6,8,9 part for 2006 to 2011.

I have tried

smpl 2006 2011
p85to89fz1p= 5 6 6 8 9
smpl 2012 2036
p85to89fz1p=10 @all

however it tells me there is a syntax error in the p85to89fz1p= 5 6 6 8 9 part.

Are you able to provide advice about this?

Thanks

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

Re: Repeated variable input

Postby startz » Tue Feb 26, 2013 10:17 am

This worked fine for the 10's part of it.

I can't seem to find out how to manually input different values for the series though, i.e. the p85to89fz1p=5,6,6,6,8,9 part for 2006 to 2011.

I have tried

smpl 2006 2011
p85to89fz1p= 5 6 6 8 9
smpl 2012 2036
p85to89fz1p=10 @all

however it tells me there is a syntax error in the p85to89fz1p= 5 6 6 8 9 part.

Are you able to provide advice about this?

Thanks
One way to do this is to open up the series to a spreadsheet view and type in the individual values.

davey87
Posts: 24
Joined: Tue Feb 05, 2013 12:18 pm

Re: Repeated variable input

Postby davey87 » Tue Feb 26, 2013 10:19 am

Yes, that is kind of a last resort for me though due to some other factors.

I'm sure there is a way to manually input variables into a series that is already made. I just can't seem to find how to do it

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

Re: Repeated variable input

Postby EViews Gareth » Tue Feb 26, 2013 10:20 am

In EViews 8:

Code: Select all

smpl 2006 2036 p85to80fz1p.adjust = 5 6 6 6 8 9 10 r24

davey87
Posts: 24
Joined: Tue Feb 05, 2013 12:18 pm

Re: Repeated variable input

Postby davey87 » Tue Feb 26, 2013 10:21 am

Perfect!

Thanks a lot

davey87
Posts: 24
Joined: Tue Feb 05, 2013 12:18 pm

Re: Repeated variable input

Postby davey87 » Tue Feb 26, 2013 10:30 am

Actually I may have spoken too soon.

I am getting an error message that reads:

ADJUST is not a valid view for P85TO89FZ1P in "DO_P85TO89FZ1P.ADJUST = 5 6 6 6 8 9 10 R24"

Any idea why this is happening?

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

Re: Repeated variable input

Postby EViews Gareth » Tue Feb 26, 2013 10:31 am

In EViews 8:

Code: Select all

smpl 2006 2036 p85to80fz1p.adjust = 5 6 6 6 8 9 10 r24

:wink:

davey87
Posts: 24
Joined: Tue Feb 05, 2013 12:18 pm

Re: Repeated variable input

Postby davey87 » Tue Feb 26, 2013 10:32 am

Nope, Version 7.2

davey87
Posts: 24
Joined: Tue Feb 05, 2013 12:18 pm

Re: Repeated variable input

Postby davey87 » Tue Feb 26, 2013 10:33 am

Sorry I didn't notice the 8.

So there is no way to do this in Version 7?

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

Re: Repeated variable input

Postby EViews Gareth » Tue Feb 26, 2013 10:39 am

Code: Select all

smpl 2006 2006 p85to80fz1p = 5 smpl 2007 2007 p85to80fz1p = 6 smpl 2008 2008 p85to80fz1p = 6
and so on...

davey87
Posts: 24
Joined: Tue Feb 05, 2013 12:18 pm

Re: Repeated variable input

Postby davey87 » Tue Feb 26, 2013 10:45 am

Ouch.

Gonna have to upgrade to Version 8 I guess haha

Thanks again man i appreciate all the help


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 2 guests