Learn R Programming

coala (version 0.7.2)

create_abc_param: Convert Simulation Results to abc's Parameter Format

Description

This function creates an object compatible with the param argument of the abc function from coala's simulation results.

Usage

create_abc_param(sim_results, model)

Value

A data.frame that can be used as param

argument of abc.

Arguments

sim_results

The simulation results as returned from simulate.

model

The model used for the simulations.

See Also

For generating abc's summary statistics format: create_abc_sumstat

Examples

Run this code
model <- coal_model(10, 1) +
  feat_mutation(par_prior("theta", rnorm(1, 5, .5))) +
  sumstat_sfs()
sim_results <- simulate(model, nsim = 2)
abc_param <- create_abc_param(sim_results, model)
print(abc_param)

Run the code above in your browser using DataLab