Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

mcmclist2coda

Write Coda File from an Object of Class mcmc.list


Description

This function writes a coda file from an object of class mcmc.list. Note that only first entry (i.e. one chain) will be processed.

Usage

mcmclist2coda(mcmclist, name, coda.digits=5)

Arguments

mcmclist

An object of class mcmc.list.

name

Name of the coda file to be written

coda.digits

Number of digits after decimal in the coda file

Value

The coda file and a corresponding index file are written into the working directory.

Examples

## Not run: 
#############################################################################
# EXAMPLE 1: MCMC estimation 2PNO dataset Reading
#############################################################################

data(data.read)
# estimate 2PNO with MCMC with 3000 iterations and 500 burn-in iterations
mod <- sirt::mcmc.2pno( dat=data.read, iter=3000, burnin=500 )
# plot MCMC chains
plot( mod$mcmcobj, ask=TRUE )
# write sampled chains into codafile
mcmclist2coda( mod$mcmcobj, name="dataread_2pl" )

## End(Not run)

sirt

Supplementary Item Response Theory Models

v3.10-118
GPL (>= 2)
Authors
Alexander Robitzsch [aut,cre] (<https://orcid.org/0000-0002-8226-3132>)
Initial release
2021-09-22 17:45:34

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.