[R] pairwise deletion of missing cases in lm
John Fox
jfox at mcmaster.ca
Mon Sep 13 13:33:35 CEST 2004
Dear Alan,
I believe that the short answer is "no," since lm() requires a complete data
set. Flexibility is provided by your ability to write your own na.action
function, but that won't cover this case. Moreover, pairwise deletion of
missing data is probably ill-advised.
On the other hand, it shouldn't be hard to write a function that computes
regressions using pairwise deletion, starting with a covariance matrix
returned by cov().
I hope this helps,
John
> -----Original Message-----
> From: r-help-bounces at stat.math.ethz.ch
> [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Alan Simpson
> Sent: Sunday, September 12, 2004 11:04 PM
> To: 'r-help at lists.R-project.org'
> Subject: [R] pairwise deletion of missing cases in lm
>
> Does anybody know if there is some sort of "pairwise" option
> for handling missing cases in lm and computing the relevant
> statistics?
>
> I would be much obliged if anyone could help...
>
> Regards
>
> Alan Simpson
> Roberts Research Group
>
More information about the R-help
mailing list