create_jaatha_model.function {jaatha} | R Documentation |
Specify a jaatha model using a simulation function
Description
This is the usual way to specify a jaatha model. An detailed exampled on doing so is given in the 'jaatha-intro' vignette.
Usage
## S3 method for class ''function''
create_jaatha_model(
x,
par_ranges,
sum_stats,
...,
scaling_factor = 1,
test = TRUE
)
Arguments
x |
A simulation function. This function takes model parameters as input, and returns the simulated data. The function must take exactly one argument, which is a numeric vector of model parameters for which the simulation should be conducted. The function should return the simulation results in an arbitrary format, that is then passed on to the summary statistics. |
par_ranges |
A matrix stating the possible values for the model parameters. The matrix must have one row for each parameter, and two columns which state the minimal and maximal possible value for the parameter. |
sum_stats |
A list of summary statistics created with
|
... |
Currently unused. |
scaling_factor |
If your model is a down-scaled version of your data, you can indicated this using this value. The estimated expectation values are multiplied with this factor before the likelihood is calculated. |
test |
A logical indicating whether a simulation is performed to test the model. |
Examples
create_jaatha_model(function(x) rpois(10, x),
par_ranges = matrix(c(0.1, 0.1, 10, 10), 2, 2),
sum_stats = list(create_jaatha_stat("sum", sum)))