Description Usage Arguments Value Examples
Most common use case is a data.frame full of observations and you want to simulate different values of a few variables while keeping the others fixed. This is important in models with interactions as well as non-linear models. The data.frame return from this function can go directly into a stats::predict call if the model being predicted on supports that interface.
1 | scenarios(datapoint, varvals)
|
datapoint |
containing all variables that a scenarios needs in addition to the ones you want to manipulate |
varvals |
is a named list where each list item is a vector with all the values you would like to test for the named variable |
a tibble with all the combinations of the values you choose to change
1 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.