From: Spencer Graves <spencer.graves_at_pdf.com>

Date: Thu 10 Aug 2006 - 16:34:34 EST

R-help@stat.math.ethz.ch 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. Received on Thu Aug 10 16:38:23 2006

Date: Thu 10 Aug 2006 - 16:34:34 EST

<see in line>

zhijie zhang wrote:

> Dear friends,

*> In R, the help of "bic.glm" tells the difference between postmean(the
**> posterior mean of each coefficient from model averaging) and
**> condpostmean(the posterior mean of each coefficient conditional on the
**> variable being included in the model), But it's still unclear about the
**> results explanations, and the artile of Rnews in 2005 on BMA still don't
**> give more detail on it.
**> Suppose my results of logistic regression analyzed by bic.glm (BMA) as
**> follows:(dataset is birthwt(MASS) and i include the interaction)
**>
**>
**>
**> p!=0 EV SD condEV cond SD model 1 model
**> 2 model 3 model 4 model 5
**>
**> Intercept 100 0.1841 1.2204 0.184 1.220 1.017
**> 1.175 -0.853 -1.057 0.532
**>
**> age 17.8 -0.0113 0.0285 -0.063 0.036 .
**> . . . -0.071
**>
**> lwt 50.0 -0.0079 0.0093 -0.016 0.007 -0.017 -
**> 0.017 . . .
**>
**> smokeTRUE 9.5 0.0469 0.1798 0.496 0.345 .
**> .
**> . . .
**>
**> ptdTRUE 99.4 1.5161 0.4751 1.526 0.461 1.407
**> 1.596 1.732 1.463 1.608
**>
**> htTRUE 54.4 0.9477 1.0269 1.742 0.744 1.894
**> 1.930 . . .
**>
**> uiTRUE 13.3 0.0976 0.2987 0.731 0.453 .
**> . . . .
**>
**> ftv 12.3
**>
**>
**> .1 -0.0257 0.5117 -0.209 2.438 .
**> .
**> -0.867 . .
**>
**> .2+ 0.7470 2.1277 6.081 3.371 .
**> . 6.024 . .
**>
**> age.ftv1 33.7 -0.0136 0.0278 -0.040 0.035 . -
**> 0.036 . . .
**>
**> age.ftv2. 15.9 -0.0340 0.0950 -0.214 0.135 .
**> . -0.271 . .
**>
**> smokeTRUE.uiTRUE 2.4 0.0103 0.1209 0.422 0.652 .
**> .
**> . . .
**>
**>
**>
**>
**> nVar 3
**> 4
**> 3 1 2
**> post prob 0.117
**> 0.086 0.083 0.061 0.044
**>
**> 1. how should I write my final logistic model?
*

SG: The "final logistic model" is actually a weighted average of the "model 1", "model 2", ..., "model 49", with weights given by the "postprob" attribute of the model fit object. I know of no simpler form.

> 2. Which parameter estimation should be used, condEV OR EV?

SG: It depends on what you want to do. For a qualitative assessment of the importance of different variables, you could use either or both together; if they are substantially different, you know there is "multicollinearity", i.e., the explanatory variables are highly correlated.

It would be nice to have predict methods in BMA. Writing one for 'bicreg' should be fairly easy, e.g., using the following:

E(f) = E(over i of E(f|i))

var(f) = var(over i of E(f|i)) + E(over i of var(f|i)).

However, this won't work very well for an object of class 'bic.glm'. To get predicted probability of success for this, a function like this could call 'predict.glm' repeatedly, once for each model considered, transform each answer into "probability of success" for that model, then average the results with weights given by 'postprob'. There may be literature on how to get confidence bounds, but I'm not familiar with it. One possibility might be Monte Carlo: Select a model at random following "postprob", then compute a random vector of parameter estimates for that model using estimated mean and covariance matrix, then convert that either to predicted logits or "probability of success" at each point desired. Do that, say, 1,000 or 10,000 times. For each set of predictions, compute "quantile(..., c(.025, .975))".

I haven't tried this, but I believe it should work.

Hope this helps. Spencer Graves

How should I use

> the two different parameter estimations correctly?

*> Thanks for your precious time!
**>
*

>

R-help@stat.math.ethz.ch 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. Received on Thu Aug 10 16:38:23 2006

Archive maintained by Robert King, hosted by
the discipline of
statistics at the
University of Newcastle,
Australia.

Archive generated by hypermail 2.1.8, at Thu 10 Aug 2006 - 18:23:22 EST.

*
Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help.
Please read the posting
guide before posting to the list.
*