I have a dated, quaterly workfile. I want to use the "smpl" command to make my sample start at the last non-missing observation of a variable x.
Using @ilast(x) gives me the observation ID, rather than the date of the observation. Typing "smpl @ilast(x) @end" therefore yields an "illegal date" error message.
Is there a simple way to tell eviews to begin the sample at the last known value of variable x?
Sample starting from last non-missing observation
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Sample starting from last non-missing observation
You can use @otod to convert the observation ID into a date string. You can then put that string into the sample statement.
Re: Sample starting from last non-missing observation
If I type smpl @otod(@ilast(x)) 2010Q4, I still get the illegal date message!
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Sample starting from last non-missing observation
Code: Select all
%start = @otod(@ilast(x))
smpl {%start} 2010q4
Who is online
Users browsing this forum: No registered users and 2 guests
