MultHomog                package:gnm                R Documentation

_g_n_m "_p_l_u_g-_i_n" _F_u_n_c_t_i_o_n _t_o _F_i_t _M_u_l_t_i_p_l_i_c_a_t_i_v_e _I_n_t_e_r_a_c_t_i_o_n_s _w_i_t_h
_H_o_m_o_g_e_n_e_o_u_s _E_f_f_e_c_t_s

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

     A function to provide the objects and functions required to fit
     multiplicative interactions with homogeneous effects in a
     generalized nonlinear model using 'gnm'.

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

     MultHomog(...)

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

     ...: a comma-separated list of two or more factors. 

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

     Designed to work as a plug-in function for 'gnm', 'MultHomog'
     produces the objects required to fit a multiplicative interaction
     with one component in which the constituent multipliers are the
     effects of two or more factors and the effects of these factors
     are constrained to be equal when the factor levels are equal. Thus
     the interaction effect would be

                         gamma_i gamma_j ...

     for an observation with level i of the first factor, level j of
     the second factor and so on, where gamma_l is the effect for level
     l of the homogeneous multiplicative factor.

     To specify a homogeneous multiplicative interaction in the formula
     argument to 'gnm', the symbolic wrapper 'Nonlin' must be used,
     with a call to 'MultHomog' as the first argument.

     If the factors passed to 'MultHomog' do not have exactly the same
     levels, the set of levels is taken to be the union of the factor
     levels, sorted into increasing order.

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

     A list with the components required of a 'gnm' plug-in function: 

  labels: a character vector of labels for the parameters in the
          interaction. 

predictor: a function that takes estimates of the parameters in the
          interaction and returns the fitted values. 

localDesignFunction: a function that takes a vector of estimates of the
          parameters in the interaction and returns the local design
          matrix. 

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

     Heather Turner

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

     Goodman, L. A. (1979) Simple Models for the Analysis of
     Association in Cross-Classifications having Ordered Categories.
     _J. Am. Stat. Assoc._, *74(367)*, 537-552.

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

     'gnm' and 'Nonlin' for usage.

     'Dref' for another 'gnm' plug-in function.

     'Mult' for specifying multiplicative interactions in 'gnm'
     formulae.

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

     set.seed(1)
     data(occupationalStatus)

     ##  Fit an association model with homogeneous row-column effects
     RChomog <- gnm(Freq ~ origin + destination + Diag(origin, destination) +
                    Nonlin(MultHomog(origin, destination)), family = poisson,
                    data = occupationalStatus)
     ## Deviance is 32.56, 34 d.f.

