Compute an analysis of individual variable contributions or model comparisons for one or more Naive Discriminatory Reader model fits.
# S3 method for ndlClassify
anova(object, …, statistic = "deviance", test = "Chisq")
Object(s) of class "ndlClassify"
, typically the result of a
call to ndlClassify
, or a list of objects
for the
ndlClassifylist
method.
A character string specifying the statistic describing the fit
that is to be compared, by default deviance
, which is
obtained from the object(s).
A character string, determining the statistical method by which
the significance of the comparison are done, by default the
Chi-squared test (Chisq
).
An object of class "anova"
inheriting from class
"data.frame"
.
Currently, comparison of the terms of a single model or multiple
models is only implemented based on the deviance
statistic.
Specifying a single object gives a sequential analysis of deviance table for that fit. That is, the reductions in the residual deviance as each term of the formula is added in turn are given in as the rows of a table, plus the residual deviances themselves.
If more than one object is specified, the table has a row for the residual degrees of freedom and deviance for each model. For all but the first model, the change in degrees of freedom and deviance is also given. (This only makes statistical sense if the models are nested.) It is conventional to list the models from smallest to largest, but this is up to the user.
The table will contain test statistics (and P values) comparing the reduction in deviance for the row to the residuals. Only a comparison of models or contributions of their components by the chi-squared test has been implemented.
The comparison between two or more models by anova
or
anova.ndlClassifylist
will only be valid if they are
fitted to the same dataset. If anova.ndlClassifylist
detects this, it will stop and report an error.
Arppe, A. and Baayen, R. H. (in prep.) Statistical classification and principles of human learning.
# NOT RUN {
data(think)
set.seed(314)
think <- think[sample(1:nrow(think),500),]
think.ndl1 <- ndlClassify(Lexeme ~ Agent * Person, data=think)
anova(think.ndl1)
think.ndl2 <- ndlClassify(Lexeme ~ Agent * Person + Patient, data=think)
anova(think.ndl1, think.ndl2)
# }
Run the code above in your browser using DataLab