# 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))
# }
Run the code above in your browser using DataLab