Learn R Programming

pscl (version 0.5)

idealToMCMC: Convert and object of class ideal to an MCMC object

Description

Converts the x element of an ideal object to an MCMC object, as used in the coda package.

Usage

idealToMCMC(x, start=rownames(x$x)[1])

Arguments

x
an object of class ideal.
start
numeric, integer, the number of the iteration with which to begin when converting to an MCMC object.

Value

  • A mcmc object as used by the coda package, starting at iteration start, drawn from the x component of the ideal object.

See Also

ideal, mcmc

Examples

Run this code
data(s109)
id1 <- ideal(s109,
             d=1,
             meanzero=TRUE,
             maxiter=1000,   ## short run for demo purposes
             burnin=100,
             thin=10)
id1coda <- idealToMCMC(id1)
summary(id1coda)

Run the code above in your browser using DataLab