[R] plotting results from leaps library

Gavin Simpson gavin.simpson at ucl.ac.uk
Wed Oct 8 12:39:25 CEST 2003


Anne Piotet wrote:
> Hi In trying to fit a linear model , I use the leaps() function to 
> determine wich predictors I should include in my model. I would like 
> to plot the Mallow's Cp criteria against p with the indexes of 
> selected model variates as points labels
> 
> Is there already such a function? (I could not find it)
> 
> Thanks Anne
> 
> [[alternative HTML version deleted]]
> 
> ______________________________________________ 
> R-help at stat.math.ethz.ch mailing list 
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> 
> 

try subsets() in John Fox's car package. You need to use regsubsets() in 
package leaps, not leaps(), but the plot.subsets() function in car would 
appear to produce what you want.

HTH

Gav

-- 
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
Gavin Simpson                     [T] +44 (0)20 7679 5522
ENSIS Research Fellow             [F] +44 (0)20 7679 7565
ENSIS Ltd. & ECRC                 [E] gavin.simpson at ucl.ac.uk
UCL Department of Geography       [W] http://www.ucl.ac.uk/~ucfagls/cv/
26 Bedford Way                    [W] http://www.ucl.ac.uk/~ucfagls/
London.  WC1H 0AP.
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%




More information about the R-help mailing list