Description Usage Arguments Value References Examples
summary method for class hmclearn
1 2 3 4 5 6 7 |
object |
an object of class |
burnin |
optional numeric parameter for the number of initial MCMC samples to omit from the summary |
probs |
quantiles to summarize the posterior distribution |
... |
additional arguments to pass to |
Returns a matrix with posterior quantiles and the posterior scale reduction factor statistic for each parameter.
Gelman, A., et. al. (2013) Bayesian Data Analysis. Chapman and Hall/CRC.
Gelman, A. and Rubin, D. (1992) Inference from Iterative Simulation Using Multiple Sequences. Statistical Science 7(4) 457-472.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # Linear regression example
set.seed(521)
X <- cbind(1, matrix(rnorm(300), ncol=3))
betavals <- c(0.5, -1, 2, -3)
y <- X%*%betavals + rnorm(100, sd=.2)
f1 <- hmc(N = 500,
theta.init = c(rep(0, 4), 1),
epsilon = 0.01,
L = 10,
logPOSTERIOR = linear_posterior,
glogPOSTERIOR = g_linear_posterior,
varnames = c(paste0("beta", 0:3), "log_sigma_sq"),
param=list(y=y, X=X), parallel=FALSE, chains=1)
summary(f1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.