StanDDM | R Documentation |
Will fit or simulate all models defined in "include" and apply all Stan sampler arguments.
StanDDM(data = NULL, include_models = c(), num_cores = 4,
simulation = FALSE, warmup = 500, iter = 2000, stepsize = 0.15,
adapt_delta = 0.85, max_treedepth = 30)
data |
If |
include_models |
A vector of strings to indicate which models should be fitted to the data or used in the simulations. 'Pure', 'st', 'sv', 'sz', 'sv_sz', 'st_sv', 'sz_st' and 'sv_sz_st' can be included in any order. It is also possible to load in custom models. See the github readme for instructions. |
num_cores |
Number of CPU cores to be used for the fitting procedure. Note that for each core, a MCMC chain will be assigned automatically. The minimum amount of available cores on your machine should be 4. |
simulation |
A boolean that if |
warmup |
Warmup iterations which will be discarded. 500 to 1000 are recommended, but should be adjusted to accomodate rig capacities and model properties. |
iter |
MCMC iterations per chain. 1000 to 5000 are recommended but should be adjusted to accomodate rig capacities and model properties. |
stepsize |
Initial NUTS step-size. Will adapt after a some iterations. Adjust to own parameter space if necessary. See the Stan Manual for more information. |
adapt_delta |
See the Stan Manual for more information. |
max_treedepth |
See the Stan Manual for more information. |
Calls the defined models, which will return a stanfit object, save plots on memory and show RMSE and R^2 values.
If simulation = TRUE
, additional plots will be saved for checking how well parameters were recovered.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.