Learn R Programming

BMA (version 3.12)

plot.bicreg: Plots the posterior distributions of coefficients derived from Bayesian model averaging

Description

Displays plots of the posterior distributions of the coefficients generated by Bayesian model averaging over linear regression, generalized linear and survival analysis models.

Usage

## S3 method for class 'bic.glm':
\method{plot(x, e = 1e-04, mfrow = NULL, include = 1:length(x$namesx), ...)   include.intercept = TRUE, ...)

## S3 method for class 'bic.glm':
plot(x, e = 1e-04, mfrow = NULL, include = 1:length(x$namesx), ...)

## S3 method for class 'bic.surv':
plot(x, e = 1e-04, mfrow = NULL, include = 1:length(x$namesx), ...)

Arguments

Details

Produces a plot of the posterior distribuion of the coefficients produced by model averaging. The posterior probability that the coefficient is zero is represented by a solid line at zero, with height equal to the probability. The nonzero part of the distribution is scaled so that the maximum height is equal to the probability that the coefficient is nonzero. The parameter e specifies the range over which the distributions are to be graphed by specifying the tail probabilities that dictate the range to plot over.

References

Hoeting, J.A., Raftery, A.E. and Madigan, D. (1996). A method for simultaneous variable selection and outlier identification in linear regression. Computational Statistics and Data Analysis, 22, 251-270.

Examples

Run this code
library(MASS)
data(UScrime)
x<- UScrime[,-16]
y<- log(UScrime[,16])
x[,-2]<- log(x[,-2])
plot( bicreg(x, y))

Run the code above in your browser using DataLab