margins {ltm} | R Documentation |
Checks the fit on the two- and three-way margins for ltm
and rasch
objects.
margins(object, type = c("two-way", "three-way"), nprint = 3, rule = 3.5)
object |
an object inheriting either from class ltm or class rasch . |
type |
the type of margins to be used. See Details for more info. |
nprint |
a numeric value determining the number of margins with the largest Chi-squared residuals to be printed. |
rule |
the rule of thumb used in determining the indicative goodness-of-fit. |
Rather than looking at the whole set of response patterns, we can look at the two- and three-way margins.
In the case of the former, we construct the 2 times 2 contingency tables obtained by taking the variables
two at a time. Comparing the observed and expected two-way margins is analogous to comparing the observed
and expected correlations when judging the fit of a factor analysis model. In the case of Bernoulli variates, the
comparison is made using the so called Chi-squared residuals. As a rule of thumb residuals greater than 3.5 are
indicative of poor fit. For a more strict rule of thumb use the rule
argument. The analogous procedure is
followed for the three-way margins.
An object of class margins
with components,
margins |
an array containing the values of chi-squared residuals. |
type |
the type of margins that were calculated. |
nprint |
the value of the nprint argument. |
combs |
all possible two- or three-way combinations of the items. |
rule |
the value of the rule argument. |
call |
a copy of the matched call of object . |
Dimitris Rizopoulos dimitris.rizopoulos@med.kuleuven.be
Bartholomew, D. (1998) Scaling unobservable constructs in social science. Applied Statistics, 47, 1–13.
Bartholomew, D. and Knott, M. (1999) Latent Variable Models and Factor Analysis, 2nd ed. London: Arnold.
Bartholomew, D., Steel, F., Moustaki, I. and Galbraith, J. (2002) The Analysis and Interpretation of Multivariate Data for Social Scientists. London: Chapman and Hall.
## Two- and Three-way residuals for the Rasch model m <- rasch(Lsat) margins(m) margins(m, "three") ## Two- and Three-way residuals for the two-factor model m <- ltm(Wirs ~ z1 + z2) margins(m) margins(m, "three") ## Two- and Three-way residuals for the interaction model, ## use the value 3 as a rule of thumb and report in each ## case the 4 combinations of items with the largest residuals m <- ltm(Wirs ~ z1 * z2) margins(m, rule = 3, nprint = 4) margins(m, "three", rule = 3, nprint = 4)