Does your dataset have any missing data? (without a reproducible example we can only guess).
If it does then you may be fitting the same model to different subsets of the data between the 2 methods. On Tue, Sep 25, 2012 at 9: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? This is also the case for the other models, > e.g. when I do the simplest model in the graphic: > summary(lm(Gesamt~ExpHealth)) > I get an adj. R squared of 0.009202 but the plot says something abou 0.14, > so it is not correct? I don't know how to solve this problem, any help > would be nice, thanks. > > > 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? > > ______________________________________________ > 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. > -- Gregory (Greg) L. Snow Ph.D. 538...@gmail.com ______________________________________________ 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.