From maechler@stat.math.ethz.ch  Wed Sep 15 16:36:55 1999
From: maechler@stat.math.ethz.ch (maechler@stat.math.ethz.ch)
Date: Wed, 15 Sep 1999 17:36:55 +0200 (MET DST)
Subject: buglet in lm.influence() -- easy fix but... (PR#278)
Message-ID: <199909151536.RAA18972@pubhealth.ku.dk>

(R 0.65.0 and earlier):

       example(aov)
       lm.influence(npk.aov)
gives
	Error: NA/NaN/Inf in foreign function call (arg 6)

which comes from the  lm.obj$coefficients  
(the last 3-way interaction coefficient is indetermined and accordingly NA)
argument passed to .Fortran("lminfl",...)  inside lm.influence.

The following is a simple correct patch

--- lm.influence.R	1999/08/13 06:44:12	1.5
+++ lm.influence.R	1999/09/15 15:32:11
@@ -38,6 +38,7 @@
 	     hat = double(n),
 	     coefficients = matrix(0, nr = n, nc = k),
 	     sigma = double(n),
+             NAOK = TRUE,# lm.obj$coef can have "structural" NAs
 	     DUP = FALSE)[c("hat", "coefficients", "sigma")]
 }

However, closer inspection shows that this 6th argument 
(called `b' inside  src/appl/lminfl.f) is not used at all in the code.

Ross, can I eliminate it from the subroutine lminfl() altogether ?


Martin Maechler <maechler@stat.math.ethz.ch>	http://stat.ethz.ch/~maechler/
Seminar fuer Statistik, ETH-Zentrum  LEO D10	Leonhardstr. 27
ETH (Federal Inst. Technology)	8092 Zurich	SWITZERLAND
phone: x-41-1-632-3408		fax: ...-1228			<><

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


buglet in lm.influence() -- easy fix but... (PR#278)
maechler@stat.math.ethz.ch