Description Usage Arguments Details Value Examples
Function takes a fitted model returned from fit_irtree
and
calculates summaries for all parameters using coda's
summary.mcmc.list
.
1 | summarize_irtree_fit(fit, fitMethod = NULL, interact = FALSE, ...)
|
fit |
a fitted object from |
fitMethod |
whether to use JAGS or Stan |
interact |
logical. If set to |
... |
Further arguments passed to |
The difference between the present function and directly calling coda's
summary.mcmc.list
is that, herein, the correlations of
the thetas are summarized in addition to the covariances. This is useful if
fitMethod = "jags"
, because JAGS does only save the covariances; in
Stan, the correlations are computed directly during sampling.
Returns a list containing the input fit
as well as an MCMC list and summary
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## Not run:
# generate data
N <- 20
J <- 10
betas <- cbind(rnorm(J, .5), rnorm(J, .5), rnorm(J, 1.5), rnorm(J, 0))
dat <- generate_irtree_ext(N = N, J = J, betas = betas, beta_ARS_extreme = .5)
# fit model
res1 <- fit_irtree(dat$X, revItem = dat$revItem, M = 200)
res2 <- summarize_irtree_fit(res1)
head(res2$summary$statistics)
head(res2$summary$quantiles)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.