On Sat, 12 Jan 2013, Logan Kelly wrote:
I have a matrix that I need to store as a series, but while the
sample is t observation the matrix has only t-1 rows, i.e. the first observation is
missing. The following works, but I am not sure this is the correct thing to do:
Series MySeries = NA|MyMatrix
While this works, it triggers the following warning:
Warning: generated non-finite values
What is the correct way to deal with a missing observation? I
would rather not insert a zero.
You can use the "set" variable named "skip_missing". Here's the
help
text:
<quote>
skip_missing: on (the default) or off. Controls gretl's behavior
when contructing a matrix from data series: the default is to skip
data rows that contain one or more missing values but if
skip_missing is set off missing values are converted to NaNs.
</quote>
The message "Warning: generated non-finite values" alludes to the
fact that there is no "missing value" code as such in gretl
matrices, and NAs in series are converted to NaN (Not a Number),
which propagates in much the same way as NAs do in calculations --
that is, any calculation that involves a NaN yields a NaN result.
That message should probably be suppressed when "skip_missing" is
set to "off", since by doing that the user has indicated that
she knows what she's doing.
Allin Cottrell