Description Usage Arguments Value Examples
View source: R/getFinalState.R
Extract posterior draws from last iteration
1 | getFinalState(object, iter = object$mcmc$nsave)
|
object |
An |
iter |
Integer indicating which iteration to extract. By default, the last iteration is extracted. |
A list with the values of the MCMC at the iter
-th iteration.
1 2 3 4 5 6 7 8 9 10 11 | n = c(250, 250)
p = 4
Y1 = rbind( matrix( rnorm( n[1]*p), ncol = p), matrix( rnorm(n[2]*p) + 3, ncol = p))
Y2 = rbind( matrix( rnorm( n[1]*p), ncol = p), matrix( rnorm(n[2]*p) + 4, ncol = p))
Y = rbind(Y1, Y2)
C = c( rep(1,sum(n)), rep(2,sum(n)))
ans = mpk(Y, C)
state = getFinalState(ans)
ans2 = mpk(Y, C, state = state)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.