par.trace.samples: par.trace.samples

Description Usage Arguments Value Examples

Description

Composite function that handles creating, initing, and running jags models in parallel, then collects the resulting samples.

Usage

1
2
3
par.trace.samples(file, data, n.adapt = 500, inits = NULL, n.iter = 1000,
  n.samples = 500, thin = 1, monitor, n.breaks = c(10, 2, 5),
  predictionVariable = FALSE)

Arguments

file

A jags file

data

Any data values, in a list, as though you were passing them to jags.model (you are)

n.adapt

The number of adapts to do

inits

Initial parameters

n.iter

A number of iterations to run on the update cycle

n.samples

The number of samples to collect.

thin

How much to thin

monitor

What variables do we want to monitor?

n.breaks

How often should we pause to update the user about progress?

predictionVariable

If there is a prediction variable, that variable can be produced in a special cycle, to avoid generating too much data

Value

a list of samples

Examples

1
2
3
4
5
6
7
8
9
results <- par.trace.samples(file=paste(workingDir, jagsFile , sep="")
    , data=jagsData
    , monitor=monitor
    , n.iter = updateNum
    , n.adapt = n.adapt
    , n.samples = nSamplesCoda
    , n.breaks=5
    , thin=thinning
    )

dlandy/demographicModeling documentation built on May 16, 2019, 7:10 p.m.