getContrasts               package:gnm               R Documentation

_E_s_t_i_m_a_t_e_d _C_o_n_t_r_a_s_t_s _a_n_d _S_t_a_n_d_a_r_d _E_r_r_o_r_s _f_o_r _P_a_r_a_m_e_t_e_r_s _i_n _a _g_n_m
_M_o_d_e_l

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

     For each set in a specified list of sets of parameters from a
     'gnm' model, computes the estimated simple contrasts (i.e.,
     differences) with the last parameter in the set, and estimated
     standard errors for those estimated differences.

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

     getContrasts(model, sets = NULL, nSets = 1, ...)

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

   model: a model object of class '"gnm"'

    sets: a vector of indices (if 'nSets' is 1) or a list (of length
          'nSets') of such vectors 

   nSets: the number of vectors of indices to use

     ...: arguments to pass to other functions 

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

     The indices must all be in '1:length(coef(object))'.  If 'sets =
     NULL', a Tk dialog is presented for the selection of indices
     (model coefficients).

     For each set of coefficients selected, differences with the last
     coefficient and their standard errors are computed.   A check is
     performed first on the estimability of all such differences.

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

     A list (of length 'nSets') of data frames, each containing
     variables 'estimate' and 'se'

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

     David Firth

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

     'gnm', 'se', 'checkEstimable'

_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)
     ## Examine the education multipliers (differences on the log scale):
     getContrasts(unidiff, grep("Mult1.Factor1", names(coef(unidiff))))

