[Rd] loess returns different standard errors for identical models (PR#7956)

From: <btyner_at_stat.purdue.edu>
Date: Sat 18 Jun 2005 - 04:19:19 GMT


Full_Name: Benjamin Tyner
Version: 2.1.0, 4/18/2005
OS: i686-redhat-linux-gnu
Submission from: (NULL) (4.64.8.220)

# Just run my.test() below in a newly opened R session. Once too many models have been fit (~20 on my system), the computed standard error jumps to a different value. This is (superficially) due to a different residual sum of squares, not a different one.delta. No other aspect of the fit is affected, just the computed value of s (I've run extensive testing with all.equal() to make sure). Issuing a garbage collection before doing a loess fit appears to "solve" the problem, which makes me think this is not a problem in loessc.c or loessf.f. My point is that a few loess fits in one session should not cause the estimated standard error computation go awry with no warning.

y<-rnorm(50)
x<-seq(0,1,length=50)
my.test<-function(){
counter<-0
go<-0
new.s<-0
while(go<2){
counter<-counter+1
old.s<-new.s
fit<-loess(y~x,family="symmetric")
new.s<-fit$s
if(new.s!=old.s)go<-go+1
print(paste("s = ",fit$s))
}

print(paste("Fit number ",counter," is different!",sep=""))
}

# If there does turn out to be a way to fix this is loessc.c or loessf.f, I would be happy to collaborate on that.



R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Sat Jun 18 14:21:52 2005

This archive was generated by hypermail 2.1.8 : Mon 20 Feb 2006 - 03:21:09 GMT