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

