Learn R Programming

OBsMD (version 12.0)

plot.OBsProb: Plotting of Posterior Probabilities from Objective Bayesian Design

Description

Method Function for plotting marginal factor posterior probabilities from Objective Bayesian Design.

Usage

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

Value

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

NULL.

Arguments

x

list. List of class OBsProb output from the OBsProb 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.

Author

Marta Nai Ruscone.

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.OBsProb function is called and the marginal posterior probabilities are displayed.

References

Box, G. E. P. and Meyer R. D. (1986) An Analysis of Unreplicated Fractional Factorials., Technometrics 28(1), 11--18. tools:::Rd_expr_doi("10.1080/00401706.1986.10488093").

Box, G. E. P. and Meyer, R. D. (1993) Finding the Active Factors in Fractionated Screening Experiments., Journal of Quality Technology 25(2), 94--105. tools:::Rd_expr_doi("10.1080/00224065.1993.11979432").

Consonni, G. and Deldossi, L. (2016) Objective Bayesian Model Discrimination in Follow-up design., Test 25(3), 397--412. tools:::Rd_expr_doi("10.1007/s11749-015-0461-3").

See Also

OBsProb, print.OBsProb, summary.OBsProb.

Examples

Run this code
library(OBsMD)
data(OBsMD.es5, package="OBsMD")
X <- as.matrix(OBsMD.es5[,1:5])
y <- OBsMD.es5[,6]
# Using for model prior probability a Beta with parameters a=1 b=1
es5.OBsProb <- OBsProb(X=X,y=y, abeta=1, bbeta=1, blk=0,mFac=5,mInt=2,nTop=32)
print(es5.OBsProb)
summary(es5.OBsProb)
plot(es5.OBsProb)

Run the code above in your browser using DataLab