PRESS again
That seems like an overkill, don't you think? PRESS can be expressed as:
sum { e_i / (1 - h_i) }^2
so all you need are residuals() and hat().
for "model=lm" yes, but what about "model=randomForest"? :-) best, Torsten
Andy
-----Original Message----- From: Torsten Hothorn [mailto:Torsten.Hothorn at rzmail.uni-erlangen.de] Sent: Thursday, February 27, 2003 10:26 AM To: Jacob van Wyk Cc: r-help at stat.math.ethz.ch Subject: Re: [R] PRESS again
Sorry for the repeat. The PRESS statistic is defined as sum(y-yhat(i))^2, where yhat(i) denotes the ith predicted
value using
all the data except the ith case (as used typically in
linear models).
Thanks again Jacob
library(ipred)
errorest(y ~., data=mydata, model=lm, estimator="cv",
est.para=control.errorest(k=nrow(mydata)))
does the job, given that your data is organized in a
data.frame "mydata"
with numeric response "y".
Torsten
Jacob L van Wyk Department of Mathematics and Statistics Rand Afrikaans University P O Box 524 Auckland Park 2006 South Africa Tel: +27-11-489-3080 Fax: +27-11-489-2832
______________________________________ VRYWARING Die inhoud en enige aanhegsels van hierdie elektroniese
posboodskap is
vertroulik en net vir die genoemde geadresseerdes bedoel. Verspreiding, aanstuur, publikasie of enige gebruik van die
boodskap of
aanhegsels deur enige ongemagtigde persoon is streng verbode. Die menings wat in hierdie boodskap uitgedruk word, tensy anders vermeld, is die van die skrywer en nie van die Randse Afrikaanse Universiteit of sy Bestuur nie. Gebruikersbeleide van die Randse Afrikaanse Universiteit is
beskikbaar
by: http://www.rau.ac.za/disclaimer DISCLAIMER The contents and any attachments of this electronic mail message are confidential and intended only for the named addressees. Dissemination, forwarding, publication or other use of the
message or
attachments by any unauthorised person is strictly prohibited. The views expressed in this message are, unless otherwise
stated, those
of the author and not those of the Rand Afrikaans University or its management. User policies of the Rand Afrikaans University are available at: http://www.rau.ac.za/disclaimer
______________________________________________ R-help at stat.math.ethz.ch mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help
______________________________________________ R-help at stat.math.ethz.ch mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help
------------------------------------------------------------------------------ Notice: This e-mail message, together with any attachments, contains information of Merck & Co., Inc. (Whitehouse Station, New Jersey, USA) that may be confidential, proprietary copyrighted and/or legally privileged, and is intended solely for the use of the individual or entity named on this message. If you are not the intended recipient, and have received this message in error, please immediately return this by e-mail and then delete it. ==============================================================================