Let J
being the number of alternatives. The formula may
include alternative-specific and individual specific variables. For
the latter, J-1
coefficients are estimated for each
variable. For the former, only one (generic) coefficient or J
different coefficient may be estimated.
A mFormula
is a formula for which the right hand side may
contain three parts: the first one contains the alternative specific
variables with generic coefficient, i.e. a unique coefficient
for all the alternatives ; the second one contains the individual
specific variables for which one coefficient is estimated for all the
alternatives except one of them ; the third one contains the
alternative specific variables with alternative specific coefficients.
The different parts are separeted by a ``|
'' sign. If a
standard formula is writen, it is assumed that there are only
alternative specific variables with generic coefficients.
The intercept is necessarely alternative specific (a generic intercept
is not identified because only utility differences are
relevant). Therefore, it deals with the second part of the formula. As
it is usual in R
, the default behaviour is to include an
intercept. A model without an intercept (which is hardly meaningfull)
may be specified by includint +0
or -1
in the second rhs
part of the formula. +0
or -1
in the first and in the
third part of the formula are simply ignored.
Specific methods are provided to build correctly the model matrix and to
update the formula. The mFormula
function is not intended to be
use directly. While using the mlogit
function, the first
argument is automaticaly coerced to a mFormula
object.