[R] Question about bicreg
John Fox
jfox at mcmaster.ca
Mon Apr 24 02:52:10 CEST 2006
Dear Adrian and Ian (and r-helpers),
To answer my own question: The difference is simply due to rounding; that
is, there are actually small differences in the R^2 values that account for
the differences in the BICs.
Sorry for the false alarm,
John
> -----Original Message-----
> From: John Fox [mailto:jfox at mcmaster.ca]
> Sent: Sunday, April 23, 2006 9:35 AM
> To: 'Adrian Raftery'; 'Ian Painter'
> Cc: 'r-help at stat.math.ethz.ch'
> Subject: Question about bicreg
>
> Dear Adrian and Ian (and r-helpers),
>
> I encountered a curious result in developing an example using
> the bicreg function in the BMA package: I noticed that pairs
> of models with equal R^2 and equal numbers of predictors had
> nevertheless different BIC values.
> Looking at the bicreg function, the definition of BIC appears
> to be the usual one, or close to it [bic <- n * log(1 -
> r2/100) + (size - 1) * log(n)], though in the quick look I
> took, I didn't quite see where "size"
> was coming from.
>
> In any event, I've appended some output. The data are the
> 1987 baseball-salary data (with which you might be familiar);
> I can send you the data set, if that proves useful, but at
> this point simply wanted to run the question by you.
>
> Any help would be appreciated,
>
> John
>
> ---------------- snip -------------------
>
>
> > br <- bicreg(X, log.salary, maxCol=33)
> >
> > summary(br)
>
> Call:
> bicreg(x = X, y = log.salary, maxCol = 33)
>
>
> 65 models were selected
> Best 5 models (cumulative posterior probability = 0.2022 ):
>
> p!=0 EV SD model 1
> model 2 model
> 3 model 4 model 5
> Intercept 100.0 -5.712e-01 0.6720850 -9.097e-01 -9.099e-01
> -1.001e+00 1.610e-01 -1.146e+00
> atbats 1.2 -7.598e-05 0.0006955 .
> . .
> . .
> hits 7.9 4.280e-04 0.0023605 .
> . .
> . .
> homers 2.3 -1.562e-04 0.0011977 .
> . .
> . .
> runs 0.0 0.000e+00 0.0000000 .
> . .
> . .
> rbis 0.0 0.000e+00 0.0000000 .
> . .
> . .
> walks 93.4 6.686e-03 0.0025198 7.512e-03 7.753e-03
> 8.239e-03 6.739e-03 6.247e-03
> years 0.0 0.000e+00 0.0000000 .
> . .
> . .
> career.atbats 100.0 8.316e-01 0.1272297 9.004e-01 9.014e-01
> 9.151e-01 6.858e-01 9.426e-01
> career.hits 100.0 -1.098e-03 0.0004007 -1.284e-03 -1.269e-03
> -1.651e-03 -6.317e-04 -1.557e-03
> career.homers 2.4 4.541e-05 0.0003012 .
> . .
> . .
> career.runs 54.6 8.680e-04 0.0008855 1.704e-03 1.688e-03
> 1.529e-03 . 1.614e-03
> career.rbis 36.2 3.764e-04 0.0005293 . .
> 9.876e-04 . 1.051e-03
> career.walks 59.5 -6.551e-04 0.0006580 -8.521e-04 -8.894e-04
> -9.950e-04 . -1.583e-03
> putouts 0.0 0.000e+00 0.0000000 .
> . .
> . .
> assists 8.3 -4.809e-05 0.0001787 .
> . .
> . .
> errors 0.0 0.000e+00 0.0000000 .
> . .
> . .
> middle.infield 44.2 7.835e-02 0.1082097 1.475e-01
> . .
> . .
> center.field 1.1 -1.619e-03 0.0177267 .
> . .
> . .
> catcher 71.8 1.537e-01 0.1182395 2.406e-01 2.123e-01
> 2.009e-01 . 2.107e-01
> dh 3.4 -6.842e-03 0.0425172 .
> . .
> . .
> atbats.year 98.8 -7.200e-03 0.0014719 -7.737e-03 -7.159e-03
> -7.116e-03 -6.448e-03 -7.556e-03
> hits.year 98.8 2.608e-02 0.0050614 2.572e-02 2.470e-02
> 2.808e-02 2.457e-02 2.732e-02
> homers.year 11.1 1.966e-03 0.0058173 .
> . .
> . .
> runs.year 4.3 4.312e-04 0.0022034 .
> . .
> . .
> rbis.year 50.7 4.702e-03 0.0049808 1.010e-02
> 8.065e-03 .
> 7.805e-03 .
> walks.year 20.5 2.386e-03 0.0052883 .
> . .
> . 8.710e-03
> average 0.0 0.000e+00 0.0000000 .
> . .
> . .
> career.average 0.0 0.000e+00 0.0000000 .
> . .
> . .
> onbase 1.2 -9.736e-02 0.8998396 .
> . .
> . .
> career.onbase 1.2 7.627e-02 0.6997039 .
> . .
> . .
> arbitration 41.1 1.099e-01 0.1527324 .
> . .
> 2.982e-01 .
> freeagent 100.0 3.991e-01 0.2066829 2.520e-01 2.525e-01
> 2.693e-01 6.452e-01 2.560e-01
>
>
> nVar 11
> 10 10
> 8 11
> r2 0.844
> 0.841 0.841
> 0.833 0.844
> BIC -4.261e+02 -4.259e+02
> -4.255e+02 -4.251e+02 -4.250e+02
> post prob 0.053
> 0.049 0.038
> 0.032 0.030
>
> --------------------------------
> John Fox
> Department of Sociology
> McMaster University
> Hamilton, Ontario
> Canada L8S 4M4
> 905-525-9140x23604
> http://socserv.mcmaster.ca/jfox
> --------------------------------
>
More information about the R-help
mailing list