Page 1 of 1

Data Series Handling

Posted: Sun Jun 19, 2011 1:08 am
by sschenatntu
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.

Re: Data Series Handling

Posted: Sun Jun 19, 2011 3:10 pm
by tclark
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).

Re: Data Series Handling

Posted: Sun Jun 19, 2011 7:53 pm
by sschenatntu
Todd,

It works. Thanks, I appreciate it.

Shiu-Sheng