On Sat, 12 Jan 2013, Logan Kelly wrote:
Hello,
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.
The solution you propose is correct. The warning you're seeing is a
remnant from a distant era in which NAs in matrices were frowned upon. I,
for one, would have no problems in suppressing that message. Allin?
Alternatively, you may inject a NA in your series after having built it,
as in
<hansl>
series y = MyMatrix
y[1] = NA
</hansl>
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------