Data Series Handling
-
sschenatntu
- Posts: 5
- Joined: Fri Jun 25, 2010 2:06 am
Data Series Handling
Hi!
If I have a data series that contains missing data. For instace,
ENTRY Z
2009:11 NA
2009:12 NA
2010:01 NA
2010:02 3.238747068858
2010:03 3.284710772072
2010:04 3.298702752288
2010:05 NA
2010:06 NA
Is there any RATS instruction or function that can automatically obtain the information about the start and end ectries that are not missing. I.e., automatically obtain 2010:02 and 2010:04 such that I can easily change the sample range to be 2010:02 to 2010:04.
Thanks a lot.
If I have a data series that contains missing data. For instace,
ENTRY Z
2009:11 NA
2009:12 NA
2010:01 NA
2010:02 3.238747068858
2010:03 3.284710772072
2010:04 3.298702752288
2010:05 NA
2010:06 NA
Is there any RATS instruction or function that can automatically obtain the information about the start and end ectries that are not missing. I.e., automatically obtain 2010:02 and 2010:04 such that I can easily change the sample range to be 2010:02 to 2010:04.
Thanks a lot.
Re: Data Series Handling
I think the INQUIRE command meets the need you described. For a series Z, you would write
inquire(series=Z) stpt endpt
and then stpt would be the first valid observation and endpt the last (2010:2 and 2010:4 in the example you gave).
inquire(series=Z) stpt endpt
and then stpt would be the first valid observation and endpt the last (2010:2 and 2010:4 in the example you gave).
Todd Clark
Economic Research Dept.
Federal Reserve Bank of Cleveland
Economic Research Dept.
Federal Reserve Bank of Cleveland
-
sschenatntu
- Posts: 5
- Joined: Fri Jun 25, 2010 2:06 am
Re: Data Series Handling
Todd,
It works. Thanks, I appreciate it.
Shiu-Sheng
It works. Thanks, I appreciate it.
Shiu-Sheng