apcsamp: A wrapper for "draw_chains" that will use multiple search...

Description Usage Arguments Details Value Examples

View source: R/samplingfuns.R

Description

A wrapper for "draw_chains" that will use multiple search chains in the algorithm.

Usage

1
2
apcsamp(formula, data, windowvars = c("a", "p", "c"), cores = 1,
  method = "ml", chains = 1, samples = 100, draws = 1000, ...)

Arguments

formula

A formula for a model.

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 window breaks for other sorts of continuous varaibles.

cores

Integer indicating cores to use.

method

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

samples

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

draws

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

startvals

Optional list for chain starting values.

Details

what does this look like.

Value

An object of apcsamp.

Examples

1
2
3
4
data(apcsim)
apcsamp(y1~a + I(a^2) + p + c, data=apcsim,
  windowvars=c('p','c'),method='ml',
  samples=250,cores=4,chains=4)

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