[Rd] loess returns different standard errors for identical models (PR#7956)
btyner@stat.purdue.edu
btyner at stat.purdue.edu
Sat Jun 18 06:19:19 CEST 2005
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.
More information about the R-devel
mailing list