fill series until next value
Posted: Sun Oct 30, 2016 5:43 am
Hi all,
I have a data series for event-study. I need to fill/replace the zeros in a series with the value on event days, so that the entries until the release of the next value stay constant. The data are of daily frequency and the tim interval of release dates are irregular.
For example
series1
0
0
0
2.5
0
0
1.5
0
0
0
0
1.9
I need to have a series like
2.5
2.5
2.5
2.5
1.5
1.5
1.5
1.9
1.9
1.9
1.9
1.9
I would appreciate any ideas :)
I have a data series for event-study. I need to fill/replace the zeros in a series with the value on event days, so that the entries until the release of the next value stay constant. The data are of daily frequency and the tim interval of release dates are irregular.
For example
series1
0
0
0
2.5
0
0
1.5
0
0
0
0
1.9
I need to have a series like
2.5
2.5
2.5
2.5
1.5
1.5
1.5
1.9
1.9
1.9
1.9
1.9
I would appreciate any ideas :)