| logsum {mlogit} | R Documentation |
The logsum function computes the inclusive value, or
inclusive utility, which is used to compute the surplus and to
estimate the two steps nested logit model.
logsum(coef, X = NULL, formula = NULL, data = NULL,
type = NULL, output = c("chid", "obs"))
coef |
a numerical vector or a |
X |
a matrix or a |
formula |
a formula or a |
data |
a |
type |
either |
output |
the shape of the results: if |
The inclusive value, or inclusive utility, or log-sum is the log of
the denominator of the probabilities of the multinomial logit
model. If a "group" variable is provided in the
"mlogit.data" function, the denominator can either be the one
of the multinomial model or those of the lower model of the nested
logit model.
If only one argument (coef) is provided, it should a
mlogit object and in this case, the coefficients and the
model.matrix are extracted from this model.
In order to provide a different model.matrix, further arguments
could be used. X is a matrix or a mlogit from
which the model.matrix is extracted. The
formula-data interface can also be used to construct the
relevant model.matrix.
either a vector or a matrix.
Yves Croissant
mlogit for the estimation of a multinomial logit model.