Description Usage Arguments Value Author(s) Examples
This function plots observed proportions against mean predicted probabilities. For a good fit, points should be approximately on a straight line.
1 | plotlogistic.fit.fnc(x, data, method, where, scalesize, ...)
|
x |
A logistic regression model fitted with |
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 |
where |
A vector of cut-off points for partitioning the vector of
fitted probabilities, by default |
.
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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | ## Not run:
data(dative)
require(lme4)
require(rms)
require(lmerTest)
require(optimx)
dative.lrm = lrm(RealizationOfRecipient ~ AccessOfTheme +
AccessOfRec + LengthOfRecipient + AnimacyOfRec +
AnimacyOfTheme + PronomOfTheme + DefinOfTheme + LengthOfTheme +
SemanticClass + Modality,
data = dative)
dative.glmm = glmer(RealizationOfRecipient ~ AccessOfTheme +
AccessOfRec + LengthOfRecipient + AnimacyOfRec +
AnimacyOfTheme + PronomOfTheme + DefinOfTheme + LengthOfTheme +
SemanticClass + Modality + (1|Verb),
control=glmerControl(optimizer="optimx",optCtrl=list(method="nlminb")),
data = dative, family = "binomial")
par(mfrow=c(2,2))
plotlogistic.fit.fnc (dative.lrm, dative)
mtext("lrm", 3, 3)
plotlogistic.fit.fnc (dative.glmm, dative)
mtext("lmer", 3, 3)
plotlogistic.fit.fnc (dative.lrm, dative, scalesize=0.2)
mtext("lrm", 3, 3)
plotlogistic.fit.fnc (dative.glmm, dative, method="shingle")
mtext("lmer", 3, 3)
par(mfrow=c(1,1))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.