[R] PRESS criterion in leaps

From: Andrew Smith <andrewsmith81_at_gmail.com>
Date: Fri, 11 May 2007 17:34:28 -0400

I'm interested in writing some model selection functions (for linear regression models, as a start), which incorporate the PRESS criterion since it, to my knowledge, is not currently implemented in any available model selection procedure.

I thought it would be simplest to build on already existing functions like regsubsets in package leaps. It's easy enough to calculate the PRESS criterion for a fitted lm object, but I'm having trouble deciphering the structure of the regsubsets objects that leaps works with. Is there any way to calculate press from a regsubsets? Or, to put it another way, can I get the residual vector and the diagonal entries of the hat matrix from a regsubsets object? In fact, if the hat matrix is never calculated explicitly, the columns of Q from the QR factorization would suffice.

Andrew Smith

        [[alternative HTML version deleted]]

R-help_at_stat.math.ethz.ch 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. Received on Fri 11 May 2007 - 21:41:12 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 14 May 2007 - 16:31:30 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.