Description Usage Arguments Details Value Methods (by generic) Author(s) Examples
Fit a simple hierarchical normal model with MCMC
1 2 3 4 5 6 7 8 9 10 11 | sbhm(y, s, m = 0, tauScale = NULL, engine = c("stan", "jags"),
nchains = NULL, iter = 41000, burn = 1000, thin = 4,
probs = c(0.025, 0.25, 0.5, 0.75, 0.975))
## S3 method for class 'sbhm'
print(x, digits = 3, ...)
## S3 method for class 'sbhm'
plot(x, xlab = "Estimates", ylab = "", main = "",
mle.col = "blue", sbhm.col = "orange", margins = c(5.1, 7.1, 4.1, 2.1),
offset = 0.2, lwd.step = 2, cex = 1.5, ...)
|
y |
The observed group means. |
s |
The observed group standard errors. |
m |
The top level mean. Defaults to |
tauScale |
The scale parameter for the half-Cauchy distribution for the top
level scale. Defaults to twice the range of |
engine |
Which MCMC engine to use. Defaults to |
nchains |
The number of chains to run. If not specified and |
iter |
The number of steps in each Markov chain. Defaults to |
burn |
The number of burn-in steps to be discarded from each chain.
Defaults to |
thin |
The amount of thinning of each chain to do. Defaults to |
probs |
The quantiles of the posterior distribution to print. Defaults to
|
x |
In |
digits |
In |
... |
Additional arguments to |
xlab |
In |
ylab |
In |
main |
In |
mle.col |
In |
sbhm.col |
In |
margins |
Vector of length 4 giving the margin sizes for |
offset |
In |
lwd.step |
The difference in line widths for the confidence intervals. Defaults
to |
cex, |
In |
The function requires that you have either rstan or rjags installed. Because many users of rstan would have no need for rjags, rjags is not featured as a dependency. Because rstan is not on CRAN and takes a little effort to install, the user might want to use rjags instead, so rstan is not featured as a dpeendency.
An object of class "sbhm" containing the fitted model, probs
,
engine
, the data and function call.
print
: Print method for sbhm
plot
: Plot an sbhm object
Harry Southworth
1 2 3 4 5 6 7 8 9 10 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.