View source: R/ABC_emulation.R
ABC_emulation  R Documentation 
This function launches a series of nb_design_pts
model simulations with model parameters drawn in the prior distribution specified in prior_matrix
, build an emulator with these computed design points and then launches a series of nb_simul
emulator simulations.
ABC_emulation(model, prior, nb_design_pts, nb_simul, prior_test=NULL, summary_stat_target=NULL, emulator_span = 50, tol=NULL, use_seed=FALSE, seed_count=0, n_cluster=1, verbose=FALSE, progress_bar=FALSE)
model 
a 
prior 
a list of prior information. Each element of the list corresponds to a model parameter. The list element must be a vector whose first argument determines the type of prior distribution: possible values are 
nb_design_pts 
a positive integer equal to the desired number of simulations of the model used to build the emulator. 
nb_simul 
a positive integer equal to the desired number of simulations of the emulator. 
prior_test 
a string expressing the constraints between model parameters.
This expression will be evaluated as a logical expression, you can use all the logical operators including 
summary_stat_target 
a vector containing the targeted (observed) summary statistics.
If not provided, 
emulator_span 
a positive number, the number of design points selected for the local regression.

tol 
tolerance, a strictly positive number (between 0 and 1) indicating the proportion of simulations retained nearest the targeted summary statistics. 
use_seed 
logical. If 
seed_count 
a positive integer, the initial seed value provided to the function 
n_cluster 
a positive integer. If larger than 1 (the default value), 
verbose 
logical. 
progress_bar 
logical, 
The returned value is a list containing the following components:
param 
The model parameters used in the 
stats 
The summary statistics obtained at the end of the 
weights 
The weights of the different 
stats_normalization 
The standard deviation of the summary statistics across the 
nsim 
The number of 
nrec 
The number of retained simulations (if targeted summary statistics are provided). 
computime 
The computing time to perform the simulations. 
Franck Jabot, Thierry Faure and Nicolas Dumoulin
Jabot, F., Lagarrigues G., Courbaud B., Dumoulin N. (2015). A comparison of emulation methods for Approximate Bayesian Computation. To be published.
binary_model
, binary_model_cluster
, ABC_sequential
, ABC_mcmc
## Not run: ##### EXAMPLE 1 ##### ##################### ## the model is a C++ function packed into a R function  the option 'use_seed' ## must be turned to TRUE. trait_prior=list(c("unif",3,5),c("unif",2.3,1.6),c("unif",25,125),c("unif",0.7,3.2)) trait_prior ## only launching simulations with parameters drawn in the prior distributions ABC_emul = ABC_emulation(model=trait_model, prior=trait_prior, nb_design_pts=10, nb_simul=300, use_seed=TRUE, progress=TRUE) ABC_emul ## launching simulations with parameters drawn in the prior distributions and performing # the rejection step sum_stat_obs=c(100,2.5,20,30000) ABC_emul = ABC_emulation(model=trait_model, prior=trait_prior, tol=0.2, nb_design_pts=10, nb_simul=100, summary_stat_target=sum_stat_obs, use_seed=TRUE, progress=TRUE) ABC_emul ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.