Description Usage Arguments Value Author(s) See Also
mlogit.data
is deprecated, use dfidx::dfidx()
instead,
mFormula
is replaced by Formula::Formula()
and zoo::index()
by idx
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | mlogit.data(
data,
choice = NULL,
shape = c("long", "wide"),
varying = NULL,
sep = ".",
alt.var = NULL,
chid.var = NULL,
alt.levels = NULL,
id.var = NULL,
group.var = NULL,
opposite = NULL,
drop.index = FALSE,
ranked = FALSE,
subset = NULL,
...
)
mFormula(object)
## S3 method for class 'formula'
mFormula(object)
## Default S3 method:
mFormula(object)
## S3 method for class 'mFormula'
model.matrix(object, data, ...)
is.mFormula(object)
## S3 method for class 'dfidx'
index(x, ...)
## S3 method for class 'mlogit'
index(x, ...)
|
data |
a |
choice |
the variable indicating the choice made: it can be either a logical vector, a numerical vector with 0 where the alternative is not chosen, a factor with level 'yes' when the alternative is chosen |
shape |
the shape of the |
varying |
the indexes of the variables that are alternative specific, |
sep |
the seperator of the variable name and the alternative
name (only relevant for a |
alt.var |
the name of the variable that contains the
alternative index (for a |
chid.var |
the name of the variable that contains the choice index or the name under which the choice index will be stored, |
alt.levels |
the name of the alternatives: if null, for a
|
id.var |
the name of the variable that contains the individual index if any, |
group.var |
the name of the variable that contains the group index if any, |
opposite |
returns the opposite of the specified variables, |
drop.index |
should the index variables be dropped from the
|
ranked |
a logical value which is true if the response is a rank, |
subset |
a logical expression which defines the subset of observations to be selected, |
... |
further arguments passed to |
x, object |
a |
drop |
a boolean, equal to |
mlogit.data
now returns a dfidx
object, mFormula
simply calls Formula::Formula()
and returns a Formula
object.
Yves Croissant
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.