Data Series Handling

For questions and discussion related to reading in and working with data.

Data Series Handling

Postby sschenatntu » Sun Jun 19, 2011 1:08 am

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.
sschenatntu
 
Posts: 5
Joined: Fri Jun 25, 2010 2:06 am

Re: Data Series Handling

Postby tclark » Sun Jun 19, 2011 3:10 pm

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).
Todd Clark
Economic Research Dept.
Federal Reserve Bank of Cleveland
tclark
 
Posts: 46
Joined: Wed Nov 08, 2006 4:20 pm

Re: Data Series Handling

Postby sschenatntu » Sun Jun 19, 2011 7:53 pm

Todd,

It works. Thanks, I appreciate it.

Shiu-Sheng
sschenatntu
 
Posts: 5
Joined: Fri Jun 25, 2010 2:06 am


Return to Data: Reading, Writing, Transforming

Who is online

Users browsing this forum: No registered users and 1 guest