Re: [R] cv.glm {boot}

From: Prof Brian Ripley <>
Date: Tue 15 Mar 2005 - 18:05:49 EST

On Mon, 14 Mar 2005, Trevor Wiens wrote:

> I am try to cross validate some logistic regressions. cv.glm allows me
> to do this randomly but since I have data over a number of years and
> over a number of distince areas, I would like to cross-validate
> temporarly and spatially. I've already attached the temporal and spatial
> attributes to my data, but I'm unsure as to how to achieve this, as it
> seems I can't use cv.glm for this purpose.

Cross-validation assumes exchangeability of units. You can easily write your own code (lots of examples in MASS), but first you would need to prove the validity of what you are attempting. For example, dropping chunks in the middle of a time series is not valid unless your prediction somehow takes the temporal structure into account (and glm does not).

Brian D. Ripley,        
Professor of Applied Statistics,
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________ mailing list
PLEASE do read the posting guide!
Received on Tue Mar 15 18:14:24 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:30:47 EST