yaish                  package:gnm                  R Documentation

_C_l_a_s_s _M_o_b_i_l_i_t_y _b_y _L_e_v_e_l _o_f _E_d_u_c_a_t_i_o_n _i_n _I_s_r_a_e_l

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

     A 3-way contingency table of father/son pairs, classified by
     father's social class ('orig'), son's social class ('dest') and
     son's  education level ('educ').

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

     data(yaish)

_F_o_r_m_a_t:

     A table of counts, with classifying factors 'educ' (levels '1:5'),
     'orig' (levels '1:7') and 'dest' (levels '1:7').

_A_u_t_h_o_r(_s):

     David Firth

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

     Yaish, M (1998). Opportunities, Little Change. Class Mobility in
     Israeli Society: 1974-1991.  D.Phil. Thesis, Nuffield College,
     University of Oxford.

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

     set.seed(1)
     data(yaish)

     ## Fit the "UNIDIFF" mobility model across education levels

     unidiff <- gnm(Freq ~ educ:orig + educ:dest +
                          Mult(Exp(-1 + educ), orig:dest), family = poisson,
                          data = yaish)
     ## Deviance should be 208.3

     ##  Look at the multipliers of the orig:dest association:
     coefs.of.interest <- grep("Mult1.*educ", names(coef(unidiff)))
     coef(unidiff)[coefs.of.interest]
     ## Mult1.Factor1.educ1 Mult1.Factor1.educ2 Mult1.Factor1.educ3 
     ##           1.9853067           1.7685557           1.2540751 
     ## Mult1.Factor1.educ4 Mult1.Factor1.educ5 
     ##           0.9551895          -0.2525413

     ## Get standard errors for contrasts with educ5
     getContrasts(unidiff, coefs.of.interest)
     ##                     estimate        se
     ## Mult1.Factor1.educ1 2.237848 0.9411054
     ## Mult1.Factor1.educ2 2.021097 0.9434948
     ## Mult1.Factor1.educ3 1.506616 0.9535574
     ## Mult1.Factor1.educ4 1.207731 0.9780784
     ## Mult1.Factor1.educ5 0.000000 0.0000000

     ## Table of model residuals
     residuals(unidiff)

