summary.MHLS: Summarizing Metropolis-Hastings sampler outputs

Description Usage Arguments Details Value Examples

Description

Summary method for class "MHLS".

Usage

1
2
## S3 method for class 'MHLS'
summary(object, ...)

Arguments

object

an object of class "MHLS", which is a result of MHLS.

...

additional arguments affecting the summary produced.

Details

This function provides a summary of each sampled beta and subgradient.

Value

mean, median, standard deviation, 2.5% quantile and 97.5% quantile for each beta and its subgradient.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
#' set.seed(123)
n <- 10
p <- 5
X <- matrix(rnorm(n * p), n)
Y <- X %*% rep(1, p) + rnorm(n)
sigma2 <- 1
lbd <- .37
weights <- rep(1, p)
LassoResult <- lassoFit(X = X, Y = Y, lbd = lbd, type = "lasso", weights = weights)
B0 <- LassoResult$B0
S0 <- LassoResult$S0
summary(MHLS(X = X, PE = rep(0, p), sig2 = sigma2, lbd = lbd,
     weights = weights, B0 = B0, S0 = S0, niter = 50, burnin = 0,
     type = "coeff"))

EAinference documentation built on May 2, 2019, 3:36 p.m.