print.MHLS: Print Metropolis-Hastings sampler outputs

Description Usage Arguments Details Value Examples

Description

Print a brief summary of the MH sampler outputs.

Usage

1
2
## S3 method for class 'MHLS'
print(x, ...)

Arguments

x

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

...

additional print arguments.

Details

print.MHLS prints out last 10 iterations and a brief summary of the simulation; number of iterations, number of burn-in periods, PE, PEtype and acceptance rate.

Value

Above results are silently returned.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
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
Result <- MHLS(X = X, PE = rep(0, p), sig2 = sigma2, lbd = lbd, group = 1:p,
     weights = weights, B0 = B0, S0 = S0, niter = 50, burnin = 0,
     type = "coeff")
print(Result)

seunghyunmin/EAinference documentation built on May 9, 2019, 5:58 p.m.