Description Usage Arguments Value Examples
Plot marginal effects / partial dependence curves
1 | margeffPlot(fit, X, y = NULL, predfun, wch = 1, res = 100, points = FALSE)
|
fit |
a model it |
X |
a data frame to be used. should not included the response variable. |
y |
the response variable. used only for plotting numeric covariates, and is optional. |
predfun |
a prediction function that takes the arguments fit and newdata, and returns a vector of predicted values. |
wch |
which variables to plot. can be a single number indexing the variable, or a vector of two numbers to plot the predicted values as a function of both variables. |
res |
the resolution of the plot, in other words, how many points along the function should define the curve/line. |
points |
if TRUE, and y is not NULL, the data points are plotted with the regression line. |
a plot
1 2 3 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.