Description Usage Arguments Value Note Examples
Common diagnostic plots for a logistic regression model
1 2 3 4 |
x |
A logistic regression model of class |
noPerPage |
Number of plots per page (for initial plots). Will be used as guidance and optimised for ease of display |
cols |
Colours. As used by |
cex |
Cex Character expansion. See |
pch |
Plotting character. See |
inches |
Width of circles for bubble plot. See |
identify |
If |
extras |
If |
width |
Width of screen(display device) in pixels |
height |
Height of screen(display device) in pixels |
The following are plotted, for each covariate group:
p_X_lev |
Probability of y=1 for this group by leverage (diagonal of hat matrix, a measure of influence) |
p_X_dXsq |
Probability as above by dXsq change in Pearson chi-square statistic with deletion of this group |
p_X_dBhat |
Probability by dBhat change in Bhat; the difference in the maximum likelihood estimators Beta for model coefficients with all subjects included vs those with this group, standardized by the estimated covariance matrix of Beta |
p_X_dDev |
Probability by dDev, the change in deviance when this group is excluded |
bubbleplot |
Probability by dXsq, with area of circle proportional to dBhat |
lev_X_dXsq |
Leverage by dXsq, the change in the Pearson chi-square statistic when this group is excluded |
lev_X_dBhat |
Leverage by dBhat, the difference in the maximum likelihood estimators Beta for model coefficients with all subjects included vs those when this group is excluded. This is standardized by the estimated covariance matrix of Beta |
lev_X_dDev |
Leverage by dDev, the change in deviance when this group is excluded |
ROC |
Receiver Operator Curve |
Additional plots are given when extras=TRUE
:
influenceplot |
See |
sr_X_hat |
Studentized residual by hat values. Studentized residual = residual / estimate of standard deviation of residual |
slp |
Spread-level plot. See
|
qqPlot |
quantile-quantile plot vs Normal for
residuals. See |
iip |
Influence-index plot. Gives Cooks distance, studentized residual and hat values for each observation |
pairs |
Pairs plot for the measures of influence
dBhat, dXsq and dDev. See |
crPlots |
Component + residual plots. See |
avPlots |
Added-variable
plots. See |
mmps |
Marginal
model plots. These require that the |
Different colors can be found with e.g.
grDevices::colours()[grep("blue",grDevices::colours())]
1 2 3 4 5 6 7 8 | set.seed(1)
### generate up to 8x covariate patterns
mod1 <- genLogiDf(b=3, f=0, c=0, n=50)$model
plotLogiDx(mod1, cex=8, noPerPage=1)
plotLogiDx(mod1, cex=3, noPerPage=6, extras=TRUE)
df1 <- genLogiDf(b=0,f=0,c=2,n=50, model=FALSE)
g1 <- glm(y ~ ., family=binomial("logit"), data=df1)
plotLogiDx(g1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.