| imageplot.bma {BMA} | R Documentation |
Creates an image of the models selected using bicreg, bic.glm or bic.surv.
imageplot.bma(bicreg.out,color="default",...)
bicreg.out |
An object of type 'bicreg', 'bic.glm' or 'bic.surv' |
color |
The color of the plot. The value "default" uses the current default R color scheme for image.
The value "blackandwhite" produces a black and white image. |
... |
Other parameters to be passed to the image and axis functions. |
Creates an image of the models selected using bicreg, bic.glm or bic.surv.
Adrian E. Raftery raftery@AT@stat.washington.edu and Hana Sevcikova
Clyde, M. (1999) Bayesian Model Averaging and Model Search Strategies (with discussion). In Bayesian Statistics 6. J.M. Bernardo, A.P. Dawid, J.O. Berger, and A.F.M. Smith eds. Oxford University Press, pages 157-185.
# logistic regression using bic.glm
library("MASS")
data(birthwt)
y<- birthwt$lo
x<- data.frame(birthwt[,-1])
x$race<- as.factor(x$race)
x$ht<- (x$ht>=1)+0
x<- x[,-9]
x$smoke <- as.factor(x$smoke)
x$ptl<- as.factor(x$ptl)
x$ht <- as.factor(x$ht)
x$ui <- as.factor(x$ui)
glm.out1<- bic.glm(x, y, strict = TRUE, OR = 20, glm.family="binomial")
imageplot.bma(glm.out1)
# logistic regression using glib
library("MASS")
data(birthwt)
y<- birthwt$lo
x<- data.frame(birthwt[,-1])
x$race<- as.factor(x$race)
x$ht<- (x$ht>=1)+0
x<- x[,-9]
x$smoke <- as.factor(x$smoke)
x$ptl<- as.factor(x$ptl)
x$ht <- as.factor(x$ht)
x$ui <- as.factor(x$ui)
glib.birthwt<- glib(x,y, error="binomial", link = "logit")
glm.birthwt<- as.bic.glm(glib.birthwt)
imageplot.bma(glm.birthwt)