Take the 2-minute tour ×
Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization. It's 100% free, no registration required.

I used regsubsets to find a model with lowest BIC; height is our D.V. , the code I typed is below:

male = read.table(file.choose(), header=TRUE)
mreg = regsubsets(height ~ biacromial + pelvic.breadth + bitrochanteric + chest.depth 
         + chest.diam + elbow.diam + wrist.diam + knee.diam + ankle.diam 
         + shoulder.girth + chest.girth + waist.girth + navel.girth + hip.girth 
         + thigh.girth + bicep.girth + forearm.girth + knee.girth + calf.girth 
         + ankle.girth + wrist.girth + age + weight
        , data=male)
plot(mreg)

enter image description here

so the best subset for male is: bitrochanteric,waist.girth+hip.girth+thigh.girth+bicep.girth, calf.girth+weight

I regress the model using lm

 mreg2 = lm(height ~ bitrochanteric + waist.girth + hip.girth + thigh.girth 
             + bicep.girth + calf.girth + weight, data=male)
 BIC(reg2)

Then I got a value of 1461.665 ,which is totally different from my graph and so I don't understand at all why it is different.

share|improve this question

1 Answer 1

up vote 3 down vote accepted

Just an investigation, I have never used this command before.

The vertical axis probably means "Drop in BIC" compared to the intercept-only model, not the model BIC.

For instance, if your ideal model has a BIC of 1451.665, corresponding to a drop of 220.

Then the model with just waist.girth and weight should have a BIC of about 1551. Because that model only has a drop of 120, which is still 100 higher than your ideal model.

Here is the track of my investigation:

library(leaps)
b<-regsubsets(Fertility~.,data=swiss,nbest=2)
summary(b)
plot(b)

enter image description here

Now compare the best and the worst models:

attach(swiss)
m01 <- glm(Fertility ~ Agriculture + Education + Catholic + Infant.Mortality)
m02 <- glm(Fertility ~ Examination)
m03 <- glm(Fertility ~ 1)
BIC(m01)
BIC(m02)
BIC(m03)
BIC(m02) - BIC(m03)  # Should be about -18
BIC(m01) - BIC(m03)  # Should be about -37
BIC(m02) - BIC(m01)  # Difference from the models
(-18) - (-37)        # Difference taken from the axis

Results:

>     BIC(m01)
[1] 336.3417
>     BIC(m02)
[1] 355.9029
>     BIC(m03)
[1] 377.4258
>     BIC(m02) - BIC(m03)  # Should be about -18
[1] -21.52281
>     BIC(m01) - BIC(m03)  # Should be about -37
[1] -41.08403
>     BIC(m02) - BIC(m01)  # Difference from the models
[1] 19.56122
>     (-18) - (-37)        # Difference taken from the axis
[1] 19
share|improve this answer
1  
BIC can take more than one model like this > BIC(m01,m02,m03) df BIC m01 6 336.3417 m02 3 355.9029 m03 2 377.4258 –  Stat Feb 22 at 5:09
    
@Stat, thanks! That's handy! –  Penguin_Knight Feb 22 at 5:15
    
@Penguin_Knight Thanks so much!!! This has bugged me for quite awhile, finally understand why. Thanks –  user40693 Feb 24 at 20:20
    
@user40693, you're welcome. This function looks pretty nifty as well. Thanks for introducing it to me. –  Penguin_Knight Feb 24 at 20:30

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.