Description Usage Arguments Value Author(s) See Also Examples
The function returns the posterior mean and Credible Set for a parameter based on a chain of posterior realizations.
For examples see
http://faculty.missouri.edu/~micheasa/sppmix/sppmix_all_examples.html#GetStats
1 | GetStats(chain, alpha = 0.05)
|
chain |
A Markov Chain (a vector) containing the posterior realizations of the parameter. |
alpha |
Level to use for the credible set. |
A list containing the min, max, mean, Credible Set and CredibleSetConfidence level.
Sakis Micheas
normmix
,
to_int_surf
,
rsppmix
,
est_mix_damcmc
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | truemix <- normmix(ps=c(.4, .2,.4), mus=list(c(0.3, 0.3), c(.5,.5),c(0.7, 0.7)),
sigmas = list(.02*diag(2), .05*diag(2), .01*diag(2)))
intsurf=to_int_surf(truemix,lambda = 100, win = spatstat::square(1))
pp1 <- rsppmix(intsurf)
fit <- est_mix_damcmc(pp1, 3)
p1=GetStats(fit$genps[,1])
p1$Mean
p1$CredibleSet
p2=GetStats(fit$genps[,2])
p2$Mean
p2$CredibleSet
p3=GetStats(fit$genps[,3])
p3$Mean
p3$CredibleSet
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.