String with dates

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

tvonbrasch
Posts: 569
Joined: Fri Apr 15, 2011 5:35 am

String with dates

Postby tvonbrasch » Thu Aug 11, 2016 4:02 am

Hi

I want to generate a string with the dates when a variable has NA values

If I write

Code: Select all

smpl="2000q1 2010q4 if avvik=na")
I get the sample when avvik is NA. But how can I get the dates of all the NA observations? Frr example, if avvik equals NA in 2000q1 and 2003q4, i want a string with those dates, i.e., "2000q1 2003q4".
Thomas

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

Re: String with dates

Postby EViews Gareth » Thu Aug 11, 2016 6:41 am

Use a loop with the @otods function and @datestr functions

tvonbrasch
Posts: 569
Joined: Fri Apr 15, 2011 5:35 am

Re: String with dates

Postby tvonbrasch » Fri Aug 12, 2016 12:02 am

Perfect, thanks
T


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 1 guest