Learn R Programming

eiPack (version 0.1-7)

read.betas: Function to read in eiMD parameter chains saved to disk

Description

In ei.MD.bayes, users have the option to save parameter chains for the unit-level betas to disk rather than returning them to the workspace. This function reconstructs the parameter chains by reading them back into R and producing either an array or an mcmc object.

Usage

read.betas(rows, columns, units, dir = NULL, ret.mcmc = TRUE)

Arguments

rows
a character vector of the row marginals to be read back in
columns
a character vector of the column marginals to be read back in
units
a character of numeric vector with the units to be read back in
dir
an optional character string identifying the directory in which parameter chains are stored (defaults to getwd)
ret.mcmc
a logical value specifying whether to return the parameters as an mcmc object (defaults to TRUE)

Value

If ret.mcmc = TRUE, an mcmc object with row names corresponding to the parameter chains. If ret.mcmc = FALSE, an array with dimensions named according to the selected rows, columns, and units.

See Also

ei.MD.bayes,mcmc