plot.BsProb: Plotting of Posterior Probabilities from Bayesian Screening

plot.BsProbR Documentation

Plotting of Posterior Probabilities from Bayesian Screening

Description

Method function for plotting marginal factor posterior probabilities for Bayesian screening.

Usage

    ## S3 method for class 'BsProb'
plot(x, code = TRUE, prt = FALSE, cex.axis=par("cex.axis"), ...)

Arguments

x

list. List of class BsProb output from the BsProb function.

code

logical. If TRUE coded factor names are used.

prt

logical. If TRUE, summary of the posterior probabilities calculation is printed.

cex.axis

Magnification used for the axis annotation. See par.

...

additional graphical parameters passed to plot.

Details

A spike plot, similar to barplots, is produced with a spike for each factor. Marginal posterior probabilities are used for the vertical axis. If code=TRUE, X1, X2, ... are used to label the factors otherwise the original factor names are used. If prt=TRUE, the print.BsProb function is called and the posterior probabilities are displayed. When BsProb is called for more than one value of gamma (g), the spikes for each factor probability are overlapped to show the resulting range of each marginal probability.

Value

The function is called for its side effects. It returns an invisible NULL.

Author(s)

Ernesto Barrios.

References

Box, G. E. P and R. D. Meyer (1986). "An Analysis for Unreplicated Fractional Factorials". Technometrics. Vol. 28. No. 1. pp. 11–18.

Box, G. E. P and R. D. Meyer (1993). "Finding the Active Factors in Fractionated Screening Experiments". Journal of Quality Technology. Vol. 25. No. 2. pp. 94–105.

See Also

BsProb, print.BsProb, summary.BsProb.

Examples

library(BsMD)
data(BM86.data,package="BsMD")
X <- as.matrix(BM86.data[,1:15])
y <- BM86.data["y1"]
# Using prior probability of p = 0.20, and k = 10 (gamma = 2.49)
drillAdvance.BsProb <- BsProb(X = X, y = y, blk = 0, mFac = 15, mInt = 1,
            p = 0.20, g = 2.49, ng = 1, nMod = 10)
plot(drillAdvance.BsProb)
summary(drillAdvance.BsProb)

# Using prior probability of p = 0.20, and a 5 <= k <= 15 (1.22 <= gamma <= 3.74)
drillAdvance.BsProbG <- BsProb(X = X, y = y, blk = 0, mFac = 15, mInt = 1,
            p = 0.25, g = c(1.22, 3.74), ng = 3, nMod = 10)
plot(drillAdvance.BsProbG, code = FALSE, prt = TRUE)

BsMD documentation built on Sept. 19, 2023, 5:07 p.m.