Smcmc | R Documentation |
Smcmc class for simulated data using Markov chain Monte Carlo
Smcmc(data, batch.size = TRUE, stacked = TRUE, varnames = colnames(data))
data |
: a list of MCMC output matrices each with 'nsim' rows and 'p' columns |
batch.size |
: logical argument, if true, calculates the batch size appropriate for this Markov chain. Setting to TRUE saves time in future steps. |
stacked |
: recommended to be 'TRUE'. logical argument, if true, stores a carefully stacked version of the MCMC output for use later. |
varnames |
: a character string equal to the number of columns in |
an Smcmc class object
# Producing Markov chain
chain <- matrix(0, nrow = 1e3, ncol = 1)
chain[1,] <- 0
err <- rnorm(1e3)
for(i in 2:1e3)
{
chain[i,] <- .3*chain[i-1,] + err[i]
}
smcmc.obj <- Smcmc(chain)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.