draw_chains: Draw a single chain.

Description Usage Arguments Value Examples

View source: R/samplingfuns.R

Description

Draw a single chain.

Usage

1
2
3
draw_chains(formula, data, windowvars = c("a", "p", "c"), cores = 1,
  method = "ml", chains = 1, samples = 10, draws = 1000,
  startvals = NULL)

Arguments

formula

A formula object.

data

A dataframe.

windowvars

A character vector naming the age, period, and cohort variables (defaults to 'a', 'p', and 'c'). This can also be used to calculate breaks for other sorts of variables.

cores

Integer indicating cores to use.

method

One of "gibbs" or "ml". For a fully bayesian estimator for a faster approximation.

samples

Integer indicating samples; used only for "gibbs" method.

draws

Integer indicating the number of models to sample in the chain.

startvals

Optional list for chain starting values.

Value

An object of apcsamp.

Examples

1
2
data(apcsamp)
draw_chains(apcsamp,method='ml',samples=250,cores=4,chains=4)

bjb40/apcwin documentation built on May 25, 2019, 3:24 p.m.