View source: R/effective_functions.r
gg_hmf | R Documentation |
Makes a Heatmap Fit plot (Esary and Pierce, 2012) using
GGPlot rather than lattice that the heatmapFit
package
uses.
gg_hmf(
observed,
prob,
method = c("loess", "gam"),
span = NULL,
nbin = 20,
R = 1000,
...
)
observed |
Vector of observe (0/1) values used in a binary regression model. |
prob |
Vector of predicted probabilities from the model
with |
method |
Method for making the line - LOESS or GAM (from the |
span |
Optional span parameter to be passed in. If
|
nbin |
Number of bins for the histogram. |
R |
Number of boostrap resamples |
... |
Currently unimplemented. |
Two ggplots - the main heatmap Fit plot and a histogram that can be included as a marginal density.
data(india)
india$bjp <- ifelse(india$in_prty == 2, 1, 0)
mod1 <- glm(bjp ~ educyrs + anti_immigration,
data=india, family=binomial)
gh1 <- gg_hmf(model.response(model.frame(mod1)),
fitted(mod1),
method="loess")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.