make.grid | R Documentation |
Generates the cartesian product of factors and ranges of continuous variables in a model.
make.grid(mod, n = 50, dmax = 5)
mod |
a model from which a model data frame can be
extracted with |
n |
number of values generated for continuous predictors. Default: 50 |
dmax |
maximum number of distinct values for a numeric variable to be considered discrete. Default: 5 |
This function is particularly useful to display fitted values of a model that is non-linear in continuous predictors where plotting curves against the original data would produce linear segments instead of a continuous curve.
By default, 50 values of each continuous variable is generated. See the examples to generate fewer values.
Variables are considered discrete if the have fewer than discrete_max distinct values.
a data frame with every combination of the values generated for each variable.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.