Smcmc: Smcmc class

View source: R/Smcmcclass.R

SmcmcR Documentation

Smcmc class

Description

Smcmc class for simulated data using Markov chain Monte Carlo

Usage

Smcmc(data, batch.size = TRUE, stacked = TRUE, varnames = colnames(data))

Arguments

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 data

Value

an Smcmc class object

Examples

# 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)

dvats/SimTools documentation built on May 14, 2023, 1:28 p.m.