margins                 package:ltm                 R Documentation

_F_i_t _o_n _t_h_e _m_a_r_g_i_n_s

_D_e_s_c_r_i_p_t_i_o_n:

     Checks the fit on the two- and three-way margins for 'ltm' and
     'rasch' objects.

_U_s_a_g_e:

     margins(object, type = c("two-way", "three-way"), nprint = 3, 
                     rule = 3.5)

_A_r_g_u_m_e_n_t_s:

  object: an object inheriting either from class 'ltm' or class
          'rasch'.

    type: the type of margins to be used. 

  nprint: a numeric value determining the number of margins with the
          largest residuals to be printed.

    rule: the rule of thumb used in determining the goodness-of-fit.

_D_e_t_a_i_l_s:

     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 can 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. The comparison is made using the  so called
     chi-squared residuals. As a rule of thumb residuals greater than 3
     (or 4) are indicative of poor fit.  Analogous procedure we follow
     for the three-way margins.

_V_a_l_u_e:

     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.

_R_e_f_e_r_e_n_c_e_s:

     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.

_S_e_e _A_l_s_o:

     'ltm', 'rasch'

_E_x_a_m_p_l_e_s:

     ## 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
     m <- ltm(Wirs~z1*z2)
     margins(m, rule=3, nprint=2)
     margins(m, "three", rule=3, nprint=2)

