# load the matrix with simulated parameter values
data(sumstats)
# select a random simulation to act as target just to test the function
target <- sumstats[10 ,]
# create a "fake" vector of model indices
# this assumes that half the simulations were from one model and the other half from other model
# this is not true but serves as an example of how to use this function
index <- c(rep("model1", nrow(sumstats)/2), rep("model2", nrow(sumstats)/2))
# perform model selection with ABC
mysel <- modelSelect(target = target, index = index, sumstats = sumstats,
tol = 0.01, method = "regression")
# compute posterior model probabilities
summary_modelSelect(object = mysel)
Run the code above in your browser using DataLab