Skip to main content
18 events
when toggle format what by license comment
Dec 26, 2012 at 22:00 answer added Greg Snow timeline score: 8
Sep 27, 2012 at 0:09 comment added gung - Reinstate Monica @user1690846, if you want to understand better why this is not a strategy that is likely to work well in the long run, you might want to read my answer here: algorithms-for-automatic-model-selection.
Sep 27, 2012 at 0:07 history edited gung - Reinstate Monica CC BY-SA 3.0
added tags; loaded figure; fixed code to show in window; formatted; light editing
Sep 26, 2012 at 13:43 answer added Michael R. Chernick timeline score: 2
Sep 26, 2012 at 11:41 comment added user1690846 well actually I want to reconstruct the regsubsets stuff because I do not understand what it actually does and I could not find a good description (yeah I now, there is a manual but this does not help me that much)
Sep 26, 2012 at 11:38 comment added mark999 summary(lm(Gesamt ~ ExpHealth, data = subset(olympiadaten, !is.na(CommunistSocialist) & !is.na(CountrySize) & !is.na(GNI) & !is.na(Lifeexp) & !is.na(Schoolyears) & !is.na(ExpMilitary) & !is.na(Mortality) & !is.na(PopPoverty) & !is.na(PopTotal) & !is.na(ExpEdu) & !is.na(ExpHealth))))
Sep 26, 2012 at 11:34 comment added mark999 I'm guessing that the difference is because your data frame contains more variables than just the ones you used in regsubsets, so you've removed too many rows. And anyway, I don't see why you would want to replicate the adjusted $R^2$ that regsubsets gives, unless it's just to understand how it was obtained.
Sep 26, 2012 at 11:26 comment added user1690846 ok @mark999, I did the estimation with the missing values deleted in the following way: > olympiadaten2<-na.omit(olympiadaten2) > attach(olympiadaten2) > Gesamt<-olympiadaten2$Gesamt > ExpHealth<-olympiadaten2$ExpHealth > summary(lm(Gesamt~ExpHealth)) but the problem is, now I get an adj. R squared of 0.009202, which is still not correct (and even more worse)?
Sep 26, 2012 at 11:21 comment added mark999 @user1690846 See Peter Flom's answer as suggested above, and/or look at Frank Harrell's "Regression Modeling Strategies" book, and/or google "harrell stepwise".
Sep 26, 2012 at 11:18 comment added user1690846 @mark999 first of all thanks for an answer, but why is this a poor method? And is selecting with AIC better? So should I fitt the model by using na.omit(olympiadaten) ? If anyone has an answer to the other questions any futher answers would be very appreciated, thanks
Sep 26, 2012 at 11:14 comment added mark999 @user1690846 I recommend looking at Peter Flom's answer to stats.stackexchange.com/questions/8303/…
Sep 26, 2012 at 11:11 comment added mark999 Thanks @MichaelChernick but I prefer just to leave it as a comment.
Sep 26, 2012 at 11:11 history edited Michael R. Chernick CC BY-SA 3.0
added 29 characters in body
Sep 26, 2012 at 11:06 comment added Michael R. Chernick @mark999 Your comments are good and it looks like it gives the right answer. You should convert it to an answer.
Sep 26, 2012 at 10:29 comment added mark999 The difference in adjusted $R^2$ is because some of the variables have missing values. I believe you would get the same adjusted $R^2$ if you fitted the model "manually" just using the subset of the data for which all the variables (in the formula in regsubsets) are non-missing. Note: choosing your model using regsubsets is considered to be a poor method.
Sep 26, 2012 at 10:00 history edited Peter Flom CC BY-SA 3.0
fixed spelling
Sep 26, 2012 at 8:56 review First posts
Sep 28, 2012 at 16:36
Sep 26, 2012 at 8:53 history asked user1690846 CC BY-SA 3.0