plot.logistic.fit.fnc {languageR} | R Documentation |
This function plots observed proportions against mean predicted probabilities. For a good fit, points should be approximately on a straight line.
plot.logistic.fit.fnc(x, data, method, where, scalesize, ...)
x |
A logistic regression model fitted with lmer or
lrm . |
data |
The data set to which the model was fitted. |
method |
Either "cut", in which case the vector of cut-off points
supplied by the "where" argument will be used to partition the fitted
probabilities, or "shingle", in which a shingle (using equal.count
and its defaults) will be used. |
where |
A vector of cut-off points for partitioning the vector of
fitted probabilities, by default seq(0, 1, by=0.1) |
scalesize |
A positive real <= 1. If not NA (the default), the circles representing data points in the graph are scaled to reflect the number of data points in the underlying data set. The scalesize parameter specifies how large the largest circle will be compared to 1 inch. For counts with large outliers, small values of scalesize are better. See example below. |
... |
other parameters to be passed through to plotting functions. |
A plot is produced on the graphics device. The R-squared value shown above the plot represents the correlation between the X and Y values in the plot. It does NOT represent the R-squared of the lrm or lmer model.
R. H. Baayen
## Not run: data(dative) library(lme4, keep.source=FALSE) dative.lrm = lrm(RealizationOfRecipient ~ AccessOfTheme + AccessOfRec + LengthOfRecipient + AnimacyOfRec + AnimacyOfTheme + PronomOfTheme + DefinOfTheme + LengthOfTheme + SemanticClass + Modality, data = dative) dative.glmm = lmer(RealizationOfRecipient ~ AccessOfTheme + AccessOfRec + LengthOfRecipient + AnimacyOfRec + AnimacyOfTheme + PronomOfTheme + DefinOfTheme + LengthOfTheme + SemanticClass + Modality + (1|Verb), data = dative, family = "binomial") par(mfrow=c(2,2)) plot.logistic.fit.fnc (dative.lrm, dative) mtext("lrm", 3, 3) plot.logistic.fit.fnc (dative.glmm, dative) mtext("lmer", 3, 3) plot.logistic.fit.fnc (dative.lrm, dative, scalesize=0.2) mtext("lrm", 3, 3) plot.logistic.fit.fnc (dative.glmm, dative, method="shingle") mtext("lmer", 3, 3) par(mfrow=c(1,1)) ## End(Not run)