denumerate               package:MASS               R Documentation

_T_r_a_n_s_f_o_r_m _a_n _A_l_l_o_w_a_b_l_e _F_o_r_m_u_l_a _f_o_r '_l_o_g_l_m' _i_n_t_o _o_n_e _f_o_r '_t_e_r_m_s'

_D_e_s_c_r_i_p_t_i_o_n:

     'loglm' allows dimension numbers to be used in place of names in
     the formula.  'denumerate' modifies such a formula into one that
     'terms' can process.

_U_s_a_g_e:

     denumerate(x)

_A_r_g_u_m_e_n_t_s:

       x: A formula conforming to the conventions of 'loglm', that is,
          it may allow dimension numbers to stand in for names when
          specifying a log-linear model. 

_D_e_t_a_i_l_s:

     The model fitting function 'loglm' fits log-linear models to
     frequency data using iterative proportional scaling.  To specify
     the model the user must nominate the margins in the data that
     remain fixed under the log-linear model.  It is convenient to
     allow the user to use dimension numbers, 1, 2, 3, ... for the
     first, second, third, ..., margins in a similar way to variable
     names.  As the model formula has to be parsed by 'terms', which
     treats '1' in a special way and requires parsable variable names,
     these formulae have to be modified by giving genuine names for
     these margin, or dimension numbers.  'denumerate' replaces these
     numbers with names of a special form, namely 'n' is replaced by
     '.vn'.  This allows 'terms' to parse the formula in the usual way.

_V_a_l_u_e:

     A linear model formula like that presented, except that where
     dimension numbers, say 'n', have been used to specify fixed
     margins these are replaced by names of the form '.vn' which may be
     processed by 'terms'.

_S_e_e _A_l_s_o:

     'renumerate'

_E_x_a_m_p_l_e_s:

     denumerate(~(1+2+3)^3 + a/b)
     ## Not run: ~ (.v1 + .v2 + .v3)^3 + a/b

