Folks,

The projection pursuit regression function in the base R seems to crash when 
the optimization level is set to zero, i.e. the initial ridge terms are 
accepted without refitting. I encountered this problem in an out-of-sample 
prediction exercise using predict. But further investigation suggests the issue 
is with the ppr fit and predict just sppeds up the crash. The other optlevels 
seem to be OK, but I have not done enough testing to say for sure.

I'm using 2.11.1 under the 32-bit Windows XP. I've also tested the codes under 
a 64-bit Ubuntu and the same problem occurred. By the way, right before Rgui 
shuts down, the pop-up window suggests it's a runtime error in C++.

Here are the codes that cause the crash,

library(mlbench)
data(BostonHousing2)
BH = BostonHousing2[,-c(1:5)]
dat1 = BH[1:200,]
dat2 = BH[201:400,]
mod = ppr(log(cmedv)~., data=dat1, optlevel=0, nterms=2, max.terms=5)
pred = predict(mod, newdata=dat2)

Thks.

HT

> sessionInfo()
R version 2.11.1 (2010-05-31)
i386-pc-mingw32

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

loaded via a namespace (and not attached):
[1] tools_2.11.1

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to