Page 1 of 1
Counting dates between observations
Posted: Tue Jan 18, 2011 6:07 am
by mikela
Hi everyone,
I have a simple but tedious problem to solve and i am starting to feel desperate...
I have lots of times series (annual data from 1900-2011) with lots of #NAs in them. What i need to do is to produce a table with the number of years between observations.
Is there an easy way to do this in eviews? I was thinking about @datediff but, for a start, I don't know how to pick the date value (for the existing observations)!
Any help is very much appreciated,
thanks
Mikela
Re: Counting dates between observations
Posted: Tue Jan 18, 2011 8:59 am
by EViews Gareth
Something like this:
Code: Select all
smpl @first @first
series count=x=na
smpl @first+1 @last
count = @recode(x=na, count(-1)+1,0)
Re: Counting dates between observations
Posted: Wed Jan 19, 2011 2:07 am
by mikela
thanks! i was struggling with cumsum (because it continue to cumulate regardless of the missing values) but with this code was much easier, thanks again!
Re: Counting dates between observations
Posted: Mon Jan 31, 2011 6:39 am
by Jen
Hi,
I have time series data for 2001, 2003, 2005, and 2007, which workfile structure type do I select?
I have selected unstructured/undated but it does not seem to be working.
What is the minimum number of observations needed for time series data?
Many Thanks,
Jen
Re: Counting dates between observations
Posted: Mon Jan 31, 2011 9:00 am
by EViews Gareth
Dated - regular frequency
Frequency - Multi-year (2 year)
Start date: 2001
End date: 2007
Re: Counting dates between observations
Posted: Mon Jan 31, 2011 1:21 pm
by Jen
Thanks Gareth that really helps.
Do you have to have data at regular intervals, for example could i have 2001, 2003, 2005, 2006, 2007, 2008?
Also what is the minimum number of observations required to run White Heteroskedacity cross terms test?
Many Thanks
Jen
Re: Counting dates between observations
Posted: Mon Jan 31, 2011 2:39 pm
by EViews Gareth
If you want irregularly spaced data, you'll have to create an irregular workfile. You'll have to consult the documentation for more information.
There is never a correct answer to the "how many observations do I need" question.