On Wed, Sep 26, 2012 at 3:03 AM, Maximilian Lklweryc <maxlklwe...@gmail.com> wrote: > Hi, > I want to make model selection with regsubsets. My code is: > > a<-regsubsets(Gesamt ~ CommunistSocialist + CountrySize + GNI + Lifeexp + > Schoolyears + ExpMilitary + Mortality + > PopPoverty + PopTotal + ExpEdu + ExpHealth, data=olympiadaten, nbest=2) > summary(a) > plot(a,scale="adjr2") > > (output attached) > > The problem is now, that I want to fit the best model again "manually" and > have a look at it, but the value of the adjusted R squared is not the same > as in the regsubsets output?
Hard to tell: you haven't given us any way to reproduce what you did. For the data example in the package the adjusted r2 values from individual models match up with the ones on the graph. I've checked another couple of data sets and they also agree. > > Also I do not understand, which models are shown there, e.g. the simple > model just with an intercept and the variable GNI is not shown in the plot, > why? You asked for the two best models of each size, so you get the two best models of each size. -thomas -- Thomas Lumley Professor of Biostatistics University of Auckland ______________________________________________ R-help@r-project.org 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.