[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Skipping NA's in statistical functions?
From: |
Søren Hauberg |
Subject: |
Re: Skipping NA's in statistical functions? |
Date: |
Sun, 08 Mar 2009 11:57:08 +0100 |
son, 08 03 2009 kl. 11:12 +0100, skrev Soren Hauberg:
> For the basic statistical functions ('mean', 'std', ...) this boils down
> to making 'sum' and 'sumsq' skip NA's. For more complicated functions,
> e.g. 'cov', some more work is required. In the thread at the
> Octave-Forge list, Jaroslav and myself proposed an implementation of
> 'cov' that optionally allows NA skipping. The implementation is
> compatible with Matlab, and follows the same strategy as R.
Just a quick follow-up: the 'sum' and 'mean' functions in R do not skip
NA's by default, but have optional arguments that changes this
behaviour. I don't know if R allows
1 + NA
to ever be evaluated to something different than NA.
Soren