grm
, ltm
, rasch
and tpm
objects.margins(object, ...)
## S3 method for class 'grm':
margins(object, type = c("two-way", "three-way"), rule = 3.5, ...)
## S3 method for class 'ltm':
margins(object, type = c("two-way", "three-way"), rule = 3.5,
nprint = 3, ...)
## S3 method for class 'rasch':
margins(object, type = c("two-way", "three-way"), rule = 3.5,
nprint = 3, ...)
## S3 method for class 'tpm':
margins(object, type = c("two-way", "three-way"), rule = 3.5,
nprint = 3, ...)
grm
, class ltm
or class rasch
.ltm
and rasch
objects.margins.ltm
if object
inherits from class ltm
, class rasch
or class tpm
,
or an object of class margins.grm
if object
inherits from class grm
, with components,margins.ltm
is an array containing the values of chi-squared residuals;
for margins.grm
is a list of length either the number of all possible pairs or all possible
triplets of items, containing the observed and expected frequencies, the values of chi-squared
residuals, the value of the total residual and the value of the rule of thumb times the product of
the number of categories of the items under consideration.nprint
argument; returned only from margins.ltm
.margins.ltm
.rule
argument; returned only from margins.ltm
.object
; returned only from margins.grm
.object
; returned only from margins.grm
.object
.rule
argument.
The analogous procedure is followed for the three-way margins.person.fit
,
item.fit
,
GoF.rasch
,## Two- and Three-way residuals for the Rasch model
fit <- rasch(LSAT)
margins(fit)
margins(fit, "three")
## Two- and Three-way residuals for the one-factor model
fit <- ltm(WIRS ~ z1)
margins(fit)
margins(fit, "three")
## Two- and Three-way residuals for the graded response model
fit <- grm(Science[c(1,3,4,7)])
margins(fit)
margins(fit, "three")
Run the code above in your browser using DataLab