model.frame.multiple          package:Zelig          R Documentation

_E_x_t_r_a_c_t_i_n_g _t_h_e "_e_n_v_i_r_o_n_m_e_n_t" _o_f _a _m_o_d_e_l _f_o_r_m_u_l_a

_D_e_s_c_r_i_p_t_i_o_n:

     Use 'model.frame.multiple' after 'parse.par' to create a data
     frame of the unique variables identified in the formula (or list
     of formulas).

_U_s_a_g_e:

     model.frame.multiple(formula, data, eqn = NULL, ...)

_A_r_g_u_m_e_n_t_s:

 formula: a list of formulas of class '"multiple"', returned from
          'parse.par'

    data: a data frame containing all the variables used in 'formula'

     eqn: an optional character string or vector of character strings
          specifying  the equations (specified in 'describe.mymodel')
          for which you would like to  pull out the relevant variables.

     ...: additional arguments passed to  'model.frame.default'

_V_a_l_u_e:

     The output is a data frame (with a terms attribute) containing all
     the unique explanatory and response variables identified in the
     list of formulas.  By default, missing ('NA') values are listwise
     deleted.

     If 'as.factor' appears on the left-hand side, the response
     variables will be returned as an indicator (0/1) matrix with
     columns corresponding to the unique levels in the factor variable.       

     If any formula contains more than one 'tag' statement,
     'model.frame.multiple' will return the original variable in the
     data frame and use the 'tag' information in the terms  attribute
     only.

_A_u_t_h_o_r(_s):

     Kosuke Imai <kimai@princeton.edu>; Gary King <king@harvard.edu>;
     Olivia Lau <olau@fas.harvard.edu>; Ferdinand Alimadhi
     <falimadhi@iq.harvard.edu>

_S_e_e _A_l_s_o:

     'model.matrix.default', 'parse.formula' and the full Zelig manual
     at <URL: http://gking.harvard.edu/zelig>

_E_x_a_m_p_l_e_s:

     ## Not run: 
     data(sanction)
     formulae <- list(import ~ coop + cost + target,
                      export ~ coop + cost + target)
     fml <- parse.formula(formulae, model = "bivariate.logit")
     D <- model.frame(fml, data = sanction)
     ## End(Not run)

