mmmstan | R Documentation |
The Stan model data may be specified by individual arguments or by passing
a suitable data
argument. The data
argument takes precedence
when it is non-null.
mmmstan(
tag_data,
list_regions,
list_sizes,
year_start,
year_end,
step_interval = "quarter",
step_duration_max = NULL,
days_duration_min = 90,
colname_date_released = "date_released",
colname_date_recovered = "date_recovered",
colname_region_released = "region_released",
colname_region_recovered = "region_recovered",
colname_size_released = "size_released",
movement_pattern = 2,
movement_allow = NULL,
movement_disallow = NULL,
mu_movement_step_diag = NULL,
sd_movement_step_diag = NULL,
mu_fishing_rate = NULL,
cv_fishing_rate = NULL,
mu_selectivity = NULL,
cv_selectivity = NULL,
mu_fishing_weight = NULL,
sd_fishing_weight = NULL,
mu_natural_mortality_rate = NULL,
sd_natural_mortality_rate = NULL,
mu_reporting_rate = NULL,
sd_reporting_rate = NULL,
mu_initial_loss_rate = 0.1,
sd_initial_loss_rate = 0.01,
mu_ongoing_loss_rate = 0.02,
sd_ongoing_loss_rate = 0.001,
mu_dispersion = 1,
sd_dispersion = 0.5,
tolerance_expected = 1e-12,
tolerance_fishing = 1e-12,
data = NULL,
chains = 1,
step_size = 0.01,
adapt_delta = 0.95,
iter_warmup = 250,
iter_sampling = 750,
max_treedepth = 10,
use_reduce_sum = FALSE,
threads_per_chain = parallel::detectCores()/(2 * chains),
refresh = 100,
...
)
tag_data |
|
list_regions |
|
list_sizes |
|
year_start |
|
year_end |
|
step_interval |
|
step_duration_max |
|
days_duration_min |
|
colname_date_released |
|
colname_date_recovered |
|
colname_region_released |
|
colname_region_recovered |
|
colname_size_released |
|
movement_pattern |
|
movement_allow |
integer() |
movement_disallow |
integer() |
mu_movement_step_diag |
numeric() |
sd_movement_step_diag |
numeric() |
mu_fishing_rate |
numeric() |
cv_fishing_rate |
|
mu_selectivity |
numeric() |
cv_selectivity |
|
mu_fishing_weight |
|
sd_fishing_weight |
|
mu_natural_mortality_rate |
|
sd_natural_mortality_rate |
|
mu_reporting_rate |
|
sd_reporting_rate |
|
mu_initial_loss_rate |
|
sd_initial_loss_rate |
|
mu_ongoing_loss_rate |
|
sd_ongoing_loss_rate |
|
mu_dispersion |
|
sd_dispersion |
|
tolerance_expected |
|
tolerance_fishing |
|
data |
|
chains |
|
step_size |
|
adapt_delta |
|
iter_warmup |
|
iter_sampling |
|
max_treedepth |
|
use_reduce_sum |
|
threads_per_chain |
|
refresh |
|
... |
additional arguments to pass to |
When the model data are specified by individual arguments, a number of
helper functions with sensible defaults are used to assemble the data
object. This is usually preferable for user convenience.
Passing the data
object directly may be preferred for example when the
data
object is the output of a simulation model, or when greater
flexibility is desired. In either event, care must be taken to ensure the
data
object matches the requirements of the underlying Stan model.
TBD
mmmstan()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.