This creates a Jaatha model from a coala model. Simulation for this model
model are conducted via the simulate
function for the coala model.
The parameters that are
estimated must be specified via par_range
and the
model must not have any other named parameters. Summary statistics present
in the coala model are used in Jaatha.
# S3 method for coalmodel
create_jaatha_model(
x,
jsfs_summary = c("sums", "folded_sums", "none", "smooth"),
four_gamete_breaks = c(0.2, 0.5),
mcmf_breaks = c(0.5, 0.7, 0.9),
jsfs_part = c(1, 3),
jsfs_part_hi = c(1, 3),
...,
scaling_factor = 1,
test = TRUE
)
The coala model
The way the Joint Site Frquency Spectrum (JSFS)
is further summarized. Can be sums
(default), none
or
"smoothing"
. For sums
, 23 different areas of the JSFS
are summed up, and the sums are used as indepented Poission statistcs.
For folded_sums
, the same sums will be calculate from the
unpolarized (folded) JSFS. This does only support two population spectra
and the default partitions at the moment.
For none
, all entries are used as indepented Possion statistics.
The value smooth
is experimental so far and should not be used.
This option has no effect if the JSFS is not a summary statistic of the
coala model.
Quantiles of the real data that will be used as breaks for binning the Four Gamete test based statistic if present in the model.
Quantiles of the real data that will be used as breaks for binning the MCMF statistic if present in the model.
Partitions used for the summarizing the JSFS. This is only
used if jsfs_summary
is "sums". Is used as the part
argument
of coarsen_jsfs
. Please go there for an explanation.
If folded_sums
is used as jsfs summary, the values of jsfs_part
and jsfs_part_hi will be ignored, and their default values c(1, 3)
will be used instead.
Same as jsfs_part
, but used as part_hi
argument in coarsen_jsfs
.
Additional parameters passed on to the dispatch function.
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.
A logical indicating whether a simulation is performed to test the model.