fit: Fit a bhsdtr model using jmap or stan

View source: R/fit.R

fitR Documentation

Fit a bhsdtr model using jmap or stan

Description

Fit a bhsdtr model using jmap or stan

Usage

fit(
  m,
  method = "jmap",
  stan_optimizations = T,
  jmap_init = 0,
  chains = parallel::detectCores() - 1,
  iter = max(20000/chains, 5000),
  warmup = 2000,
  init_r = 0.5,
  sample.prior = F,
  ...
)

Arguments

m

a (possibly fitted) bhsdtr model object

method

either 'jmap' (the default) or 'stan'

stan_optimizations

Wether to set the recommended stan optimizations (mc.cores, auto_write). The default is T.

jmap_init

initial values for the optimizing function (the default is 0)

chains

The dafault is parallel::detectCores() - 1, i.e., one core left for other tasks.

iter

The default is max(20000 / chains, 5000). Only relevant if method == 'stan'.

warmup

The default is 2000. Only relevant if method == 'stan'.

init_r

The default is .5. Only relevant if method == 'stan'.

...

other arguments passed to the optimizing or stan function

Value

a bhsdtr model object with updated $jmap (if method == 'jmap') or the $stanfit (if method == 'stan') field


boryspaulewicz/bhsdtr2 documentation built on July 17, 2024, 8:22 p.m.