Description Usage Arguments Details Value Examples
Implicit in many statistical models is a function that takes the explanatory
variables as inputs and returns the corresponding model value at those inputs.
mod_fun
creates an R function that works this way. The function returned
by 'mod_fun“ has arguments named for each of the explanatory variables. In calling
that returned function, you can specify as many or as few of these as you like.
1 |
mod |
the model to be rendered in a functional form |
nlevels |
the number of levels for which to find "typical levels" for those arguments not specified in the call to the returned function |
When you evaluate the function, you can set the values of all, any, or none of
the arguments. Any arguments that you do not set will automatically be set
to "typical values" as in mod_eval
.
There's nothing essential about the behavior of 'mod_eval“ that explicitly names the arguments to the model function with the names of the explanatory variables. This has been done purely for pedagogical reasons, as a reminder of what those variables are and to make it possible to spot mistaken inputs to models.
a function whose arguments are the explanatory variable used in the model
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.