
Last chance! 50% off unlimited learning
Sale ends in
ABC_sequential(method, model, prior_matrix, nb_simul, summary_stat_target, n_cluster = 1,...)
"Beaumont"
, "Drovandi"
, "Delmoral"
and "Lenormand"
.R
function implementing the model to be simulated. It must take as arguments an array containing a seed value (if use_seed=TRUE
) and the model parameters and returning an array of summary statistics obtained at the end of the smethod
is "Beaumont"
, "Drovandi"
and "Delmoral"
.
When method
is "Lenorma
ABC_sequential
will launch model
simulations in parallel on n_cluster
cores of the computer.model
simulations.model
simulations.model
simulations.model
simulations of the initial step.
These values are used to normalize the summary statistics before the computation of the Euclidean distance between simulations and data.model
simulations performed.binary_model
, binary_model_cluster
, ABC_rejection
, ABC_mcmc
priormatrix=cbind(c(500,3,-2.3,1,-25,-0.7),c(500,5,1.6,1,125,3.2))
sum_stat_obs=c(100,2.5,20,30000)
## artificial example to perform the Beaumont et al. (2009)'s method.
##
ABC_Beaumont<-ABC_sequential(method="Beaumont", model=trait_model, prior_matrix=priormatrix,
nb_simul=10, summary_stat_target=sum_stat_obs, n_cluster=1, tolerance_tab=c(8,5))
ABC_Beaumont
## artificial example to perform the Drovandi and Pettitt (2011)'s method.
##
ABC_Drovandi<-ABC_sequential(method="Drovandi", model=trait_model, prior_matrix=priormatrix,
nb_simul=10, summary_stat_target=sum_stat_obs, n_cluster=1, tolerance_tab=3, c=0.7)
ABC_Drovandi
## artificial example to perform the Del Moral et al. (2012)'s method.
##
ABC_Delmoral<-ABC_sequential(method="Delmoral", model=trait_model, prior_matrix=priormatrix,
nb_simul=10, summary_stat_target=sum_stat_obs, n_cluster=1, alpha=0.5, tolerance_target=3)
ABC_Delmoral
## artificial example to perform the Lenormand et al. (2012)'s method.
##
ABC_Lenormand<-ABC_sequential(method="Lenormand", model=trait_model, prior_matrix=priormatrix,
nb_simul=10, summary_stat_target=sum_stat_obs, n_cluster=1, p_acc_min=0.4)
ABC_Lenormand
Run the code above in your browser using DataLab