predicted_prob | R Documentation |
Predicted probability from svyglm model and new data, along with 95% CI.
predicted_prob(mod, df)
mod |
A svyglm model object. |
df |
A data frame of new data created with, e.g., expand.grid. |
df with three additional columns:
The predicted probability at each value in df
The lower 95% confidence limit
The upper 95% confidence limit
m = glm(am ~ mpg + hp + cyl, family=binomial, data=mtcars)
newdata = expand.grid(mpg=10:35, hp=50:335, cyl=c(4,6,8))
df = predicted_prob(m, newdata)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.