Learn R Programming

gemtc (version 0.1-2)

read.mtc.result.samples: Reading previously saved MCMC samples

Description

This is a semi-internal method for creating objects of the class mtc.result from samples written by the dput method.

Usage

read.mtc.result.samples(file, model, sampler = NULL)

Arguments

file
Path to a file created by calling dput(results$samples) on a mtc.result object
model
Reference to a mtc.model object
sampler
Optional argument to describe the type of sampler used to generate the objects

Value

  • An object of class mtc.result. This is a list with the following elements:
  • samplesThe samples resulting from running the MCMC model
  • modelA reference to the model used to produce the samples
  • samplerThe sampler used to produce the samples

encoding

utf8

See Also

mtc.run, dput

Examples

Run this code
## The function is currently defined as
function (file, model, sampler = NULL) {
    samples <- dget(file)
    results <- list(samples = samples, model = model, sampler = sampler)
    class(results) <- "mtc.result"
}

Run the code above in your browser using DataLab