Learn R Programming

bfp (version 0.0-48)

Summary of BmaSamples object: Calculate and print the summary of a BmaSamples object

Description

Calculate and print the summary of a BmaSamples object, using S3 methods for the class.

Usage

# S3 method for BmaSamples
summary(object, level = 0.95, hpd = TRUE, ...)
# S3 method for summary.BmaSamples
print(x, table = TRUE, ...)

Value

The summary method returns an S3 object, where “sampleSize”,

“modelData” and “modelFreqs” are copied from the

BmaSamples object, please see its help page for the details. “intervalType” and “level” copy the function's parameters.

“summaryMat” contains the posterior summaries for the intercept and uncertain fixed form covariates. “sigma2Sum” and

“shrinkageSum” contain the posterior summaries for the regression variance and the shrinkage factor, respectively. The summaries are always the median, mean, lower and upper credible bounds for the coefficients.

Arguments

object

a valid BmaSamples object

level

credible level for coefficients credible intervals

hpd

should emprical hpd intervals be used (default) or simple quantile-based?

x

a return value of summary.BmaSamples

table

should the model table been shown? (default)

...

unused

Author

Daniel Saban\'es Bov\'e

See Also

summary.BayesMfp

Examples

Run this code
## generate a BmaSamples object
set.seed(19)

x1 <- rnorm(n=15)
x2 <- rbinom(n=15, size=20, prob=0.5) 
x3 <- rexp(n=15)

y <- rt(n=15, df=2)

test <- BayesMfp(y ~ bfp (x2, max = 4) + uc (x1 + x3), nModels = 100,
                 method="exhaustive")

testBma <- BmaSamples(test)

## look at the summary
summary(testBma)

## and its structure
str(summary(testBma))

Run the code above in your browser using DataLab