Multiplicative interaction        package:gnm        R Documentation

_S_p_e_c_i_f_y _a _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 _i_n _a _g_n_m _M_o_d_e_l _F_o_r_m_u_l_a

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

     'Mult' is a symbolic wrapper to indicate a multiplicative
     interaction in the formula argument to 'gnm'.

     'Exp' is a symbolic wrapper to indicate an exponeniated multiplier
     in a 'Mult' term.

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

     Mult(..., multiplicity = 1)
     Exp(multiplier)

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

     ...: a comma-separated list of two or more symbolic expressions,
          which represent the constituent multipliers in each component
          of the interaction.

multiplicity: a positive integer specifying the number of components to
          fit.

multiplier: a symbolic expression.

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

     A multiplicative interaction is either (if 'multiplicity = 1') a
     product of the form 

                           m_1 m_2 ... m_n,

     where the constituent multipliers m_1, m_2, ..., m_n are linear
     predictors; or (if 'multiplicity' is greater than 1) a sum of such
     "components", each of which is a product of the same linear
     predictors (but with different parameters).

     'Mult' may be used to specify a multiplicative interaction in the
     'formula' argument to 'gnm'. The desired number of components in
     the interaction is specified by 'multiplicity'.

     Models for the constituent multipliers are specified symbolically
     as unspecified arguments to 'Mult'. These symbolic expressions are
     interpreted in the same way as the right hand side of a formula in
     an object of class '"formula"'. In particular, an intercept term
     is added by default. Offsets can be added to constituent
     multipliers, using 'offset'.

     'Exp' is a companion function to 'Mult', which may be used to
     specify an exponentiated constituent multiplier, so that the
     multiplier is constrained to be nonnegative.

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

     'Mult' returns a list of objects of class '"Mult"', with one
     element for each multiplicative component. A '"Mult"' object is a
     list of deparsed expressions representing the factors in the
     multiplicative interaction.

     'Exp' returns an object of class '"Exp"' which is a deparsed
     expression representing the multiplier to be exponentiated.

_N_o_t_e:

     These functions should only be used in formulae passed to 'gnm'.

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

     Heather Turner

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

     Vargas, M, Crossa, J, van Eeuwijk, F, Sayre, K D and Reynolds, M P
     (2001).  Interpreting treatment by environment interaction in
     agronomy trials.  _Agronomy Journal_ *93*, 949-960.

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

     'offset', 'gnm', 'Dref', 'MultHomog'

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

     set.seed(1)
     ## Using 'Mult' with 'Exp' to constrain the first constituent multiplier
     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)

     ## Not run: 
     ## (this example can take quite a while to run)
     ##
     ## Using 'multiplicity' > 1
     data(wheat)
     yield.scaled <- wheat$yield * sqrt(3/1000)
     treatment <- factor(paste(wheat$tillage, wheat$summerCrop, wheat$manure,
                               wheat$N, sep = ""))
     bilinear2 <- gnm(yield.scaled ~ year + treatment +
                      Mult(year, treatment, multiplicity = 2),
                      family = gaussian, data = wheat)
     ## End(Not run)

