ADJUST: Repeats previous non-missing value

For notifying us of what you believe are bugs or errors in EViews.
Please ensure your copy of EViews is up-to-date before posting.

Moderators: EViews Gareth, EViews Moderator

maxchen
Posts: 191
Joined: Fri Oct 10, 2008 4:03 pm

ADJUST: Repeats previous non-missing value

Postby maxchen » Thu Sep 26, 2013 2:07 am

EV8, 32bit, 2013-09-12 patch

'line continuation character: the underscore "_" as the last character on the line to join the multiple lines
However, in series proc adjust, it use underscore to "Repeats previous non-missing value", and it is at the end of line

in the following test code, data from http://www.eviews.com/Learning/AllTutorials.zip

Code: Select all

%pt = "Z:\2013\DL\EV8\SeriesGroups\" '%wf = %pt + "SeriesGroups-Data.wf1" %wf = %pt + "Data.wf1" wfopen %wf 'Editing, Documenting, Displaying Series 'ADJUST pageselect Timeseries 'ex1 edit_series.fill 1,3 edit_series(3) = 5 'LHS, not lead/lag 'ex8 smpl 1981q3 1983q3 edit_series.adjust =5..20* 'log-linear smpl @all 'ex9 smpl 1980q1 1984q3 edit_series.adjust _. 'this seems not conform the Obj-Ref 'edit_series.adjust ._ 'invalid smpl @all

EViews Chris
EViews Developer
Posts: 161
Joined: Wed Sep 17, 2008 10:39 am

Re: ADJUST: Repeats previous non-missing value

Postby EViews Chris » Thu Sep 26, 2013 10:41 am

You're right - things are a bit weird.

The 'language' for adjust was initially developed for range editing in spreadsheets where line continuation isn't a problem, but carrying it over to the adjust command has created some conflicts with line continuation.

I believe you can always work around it even in the current code because the underscore at the end of the line is only treated as a line continuation character if it is prececed by a space. Otherwise we'd get into problems with cases like this:

create u 10
series x_ = 10
series y_ = x_

where the series "x_" name ends in an underscore.

I think adjust will never require a space before the underscore, so removing any space immediately before the underscore should stop line continuation from kicking in.

However, I agree that this is kind of weird, so I've added an alternative where you can optionally use two underscores in a row instead of one to indicate 'repeat previous value' interpolation in the adjust command. This should stop line continuation kicking in because you won't have a space between the two underscores.

I looked for whether there was any other sensible character that we could use as an alternative to the underscore, but we're getting pretty short of available characters on the keyboard in the adjust command, and underscore does have the advantage of visibly resembling the operation that it is carrying out (drawing flat lines between points).

I also noticed a bug while I was testing things where the following command:

x.adjust _=

which should fill the current sample range of x with the first pre-sample value was causing EViews to crash.

This will also be fixed in the next patch we post.

Chris

maxchen
Posts: 191
Joined: Fri Oct 10, 2008 4:03 pm

Re: ADJUST: Repeats previous non-missing value

Postby maxchen » Thu Oct 03, 2013 4:18 am

thanks, in 2013-10-01 patch

both "_." and "__" works

Code: Select all

edit_series.adjust _. edit_series.adjust __
I prefer "_." , cause it does not end with "_"

maxchen
Posts: 191
Joined: Fri Oct 10, 2008 4:03 pm

Re: ADJUST: Repeats previous non-missing value

Postby maxchen » Fri Oct 10, 2014 6:25 pm

thanks, in 2013-10-01 patch

both "_." and "__" works

Code: Select all

edit_series.adjust _. edit_series.adjust __
I prefer "_." , cause it does not end with "_"
In EViews 8.1, this change seems NOT yet update in the documents: "EViews 8 Object Ref.pdf", p485.


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 2 guests