Continuous sample selection for estimation procedure
Posted: Wed Nov 20, 2013 3:40 am
Hi
I am trying to code a programme to run a recursive estimation procedure for a host of series. Some of the series have breaks and I need to select a continuous sample for each estimation iteration.
I have tried using the code, for say a generic series named x:
smpl if x <> na
However this selects the starting date for the sample as from the first non-missing observation, irrespective of non-missing observations that may be present between the first and last non-missing obs.
Imagine that the x series looks something like:
Date x
2007m12 na
2008m1 2
2008m2 5
2008m3 na
2008m4 7
2008m5 9
2008m6 10
Using the command:
smpl if x <> na
selects the sample range 2008m1 2008m6, where the continuous sample range for the series is in fact 2008m4 2008m6.
Please help????
I am trying to code a programme to run a recursive estimation procedure for a host of series. Some of the series have breaks and I need to select a continuous sample for each estimation iteration.
I have tried using the code, for say a generic series named x:
smpl if x <> na
However this selects the starting date for the sample as from the first non-missing observation, irrespective of non-missing observations that may be present between the first and last non-missing obs.
Imagine that the x series looks something like:
Date x
2007m12 na
2008m1 2
2008m2 5
2008m3 na
2008m4 7
2008m5 9
2008m6 10
Using the command:
smpl if x <> na
selects the sample range 2008m1 2008m6, where the continuous sample range for the series is in fact 2008m4 2008m6.
Please help????