Description Usage Arguments Value References See Also Examples

`abcrf`

constructs a random forest from a reference table towards performing
an ABC model choice. Basically, the reference table (i.e. the dataset that will
be treated with the present package) includes a column with the index
of the models to be compared and additional columns corresponding
to the values of the simulated summary statistics.

1 2 3 |

`formula` |
a formula: left of ~, variable representing the model index; right of ~, summary statistics of the reference table. |

`data` |
a data frame containing the reference table. |

`group` |
a list containing groups (at least 2) of model(s) on which the model choice will be performed. This is not necessarily a partition, one or more models can be excluded from the elements of the list and by default no grouping is done. |

`lda` |
should LDA scores be added to the list of summary statistics? |

`ntree` |
number of trees to grow in the forest, by default 500 trees. |

`sampsize` |
size of the sample from the reference table to grow a tree of the classification forest, by default the minimum between the number of elements of the reference table and 100,000. |

`paral` |
a boolean that indicates if the calculations of the classification random forest (forest used to assign a model to the observed dataset) should be parallelized. |

`ncores` |
the number of CPU cores to use. If paral=TRUE, it is used the number of CPU cores minus 1. If ncores is not specified and |

`...` |
additional arguments to be passed on to |

An object of class `abcrf`

, which is a list with the
following components:

`call` |
the original call to |

`lda` |
a boolean indicating if LDA scores have been added to the list of summary statistics, |

`formula` |
the formula used to construct the classification random forest, |

`group` |
a list contining the groups of model(s) used. This list is empty if no grouping has been performed, |

`model.rf` |
an object of class |

`model.lda` |
an object of class |

`prior.err` |
prior error rates of model selection on the reference table, estimated with the "out-of-bag" error of the forest. |

Pudlo P., Marin J.-M., Estoup A., Cornuet J.-M., Gautier M. and Robert, C. P. (2016)
*Reliable ABC model choice via random forests* Bioinformatics
https://doi.org/10.1093/bioinformatics/btv684

Estoup A., Raynal L., Verdu P. and Marin J.-M. (2018)
*Model choice using Approximate Bayesian Computation and Random Forests: analyses based on model grouping to make inferences about the genetic history of Pygmy human populations* Jounal de la Société Française de Statistique
http://journal-sfds.fr/article/view/709

`plot.abcrf`

,
`predict.abcrf`

,
`err.abcrf`

,
`ranger`

1 2 3 4 5 6 7 8 |

```
Call:
abcrf(formula = modindex ~ ., data = data1, ntree = 100)
includes the axes of a preliminary LDA
Number of simulations: 1
Out-of-bag prior error rate: 25.6%
Confusion matrix:
1 2 3 class.error
1 149 6 29 0.1902174
2 4 121 26 0.1986755
3 30 33 102 0.3818182
Call:
abcrf(formula = modindex ~ ., data = data1, group = list(c("1", "2"), "3"), ntree = 100)
includes the axes of a preliminary LDA
Number of simulations: 1
Out-of-bag prior error rate: 22.2%
Confusion matrix:
g1 g2 class.error
g1 303 32 0.09552239
g2 79 86 0.47878788
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.