[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
NaN and missing values
From: |
heberf |
Subject: |
NaN and missing values |
Date: |
Thu, 23 Sep 1999 12:35:42 -0500 (CDT) |
Here is a related issue to the current discussion. Sometimes it is useful to
have a matrix with missing values. To see why consider doing a regression of
some response variable on some data from 40 experiments. In each experiment 6
measurements were taken but for some reason for some experiments we could not
get a few measurements. In doing a regression using all the data you would
have
to drop any experiment which had any missing measurement. Suppose this drops
the number of complete observations to 30. At the moment what you would have
to
do is not enter any observation with missing data and create a matrix with 30
rows. But you may want to examine models in which you only do a regression on
only a few of the measurements. By restricting attention to only four
measurements you would have 35 complete observations but in order to do that
regression you have to re-enter all the data for those variables.
What you would like to do is enter all the data and code the missing
measurements with a missing value code. Then the regression or whatever you
are
doing would ignore missing values. To do the smaller regression above you
would
simply pass only a 4 data columns to the ols function instead of 6.
Would NaN be an acceptable code for this purpose or do we need another?
Heber Farnsworth
P.S. Such missing value codes are implemented in GAUSS and SAS and maybe a few
other languages.
---------------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL. To ensure
that development continues, see www.che.wisc.edu/octave/giftform.html
Instructions for unsubscribing: www.che.wisc.edu/octave/archive.html
---------------------------------------------------------------------
- NaN and missing values,
heberf <=