se                    package:gnm                    R Documentation

_S_t_a_n_d_a_r_d _E_r_r_o_r_s _o_f _L_i_n_e_a_r _P_a_r_a_m_e_t_e_r _C_o_m_b_i_n_a_t_i_o_n_s _i_n _g_n_m _M_o_d_e_l_s

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

     Computes approximate standard error for one or more linear
     combinations of the parameters in a 'gnm' (generalized nonlinear
     model) object.  By default, a check is made first on the
     estimability of each specified combination.

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

     se(model, coefMatrix, checkEstimability = TRUE, ...)

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

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

coefMatrix: numeric: either a vector of length the same as
          'length(coef(model))', or a matrix with that number of rows.
          Coefficients of one or more linear combinations of the
          model's parameters.

checkEstimability: logical: should the estimability of all specified
          combinations be checked?

     ...: possible further arguments for 'checkEstimable' 

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

     A data frame with two columns: 

estimate : The estimated parameter combinations

     se : Their estimated standard errors

     and row names the same as the column names (if any) of
     'coefMatrix'.

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

     David Firth

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

     'gnm', 'getContrasts', 'checkEstimable'

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

     data(yaish)
     set.seed(1)

     ## 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 is 208.3

     ## Get estimate and se for the contrast between educ4 and educ5 in the
     ## UNIDIFF multiplier
     educ4.pos <- grep("Mult.*educ4", names(coef(unidiff)))
     mycontrast <- rep(0, length(coef(unidiff)))
     mycontrast[educ4.pos] <- 1
     mycontrast[educ4.pos + 1] <- -1
     se(unidiff, mycontrast)

     ## Get all of the contrasts with educ5 in the UNIDIFF multipliers
     getContrasts(unidiff, grep("Mult.*educ", names(coef(unidiff))))

