Changing single data point in time series

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

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

destofante
Posts: 4
Joined: Thu Aug 03, 2017 4:01 am

Changing single data point in time series

Postby destofante » Tue Aug 20, 2019 3:47 am

I am fetching a recession dummy for the Eurozone from the Haver database:

fetch(d=G10) N025VRM2

My problem is that, for the specific analysis I am conducting, I'd like to treat the first half of 2003 as a recession (Eurozone GDP contracted in Q1, and was virtually flat in Q2). So I'd like to add a simple routine to my program to overwrite the series at 2003Q1 and 2003Q2 setting it equal 1, without doing it manually every time. It must be simple... yet... :-D
Any tip?

Thank you all in advance!

Adolfo

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

Re: Changing single data point in time series

Postby startz » Tue Aug 20, 2019 6:56 am

There is probably a more elegant way, but how about

Code: Select all

smpl 2003Q1 2003Q2
N025VRM2 = 1
smpl @all

EViews Matt
EViews Developer
Posts: 384
Joined: Thu Apr 25, 2013 7:48 pm

Re: Changing single data point in time series

Postby EViews Matt » Tue Aug 20, 2019 9:36 am

Which I believe you can rewrite as a one-liner:

Code: Select all

N025VRM2.fill(o=2003q1) 1, 1


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 2 guests