[R] PRESS again

Torsten Hothorn Torsten.Hothorn at rzmail.uni-erlangen.de
Thu Feb 27 16:27:03 CET 2003


> 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
>
>




More information about the R-help mailing list