Class mlogit
is used to store data for fitting the binomial
logistic regression model with a random intercept.
Function mlogit
creates an object of class mlogit
,
given a matrix with four or more columns that stores,
respectively, the group/cluster membership (column 1), the number
of ones or successes in the Bernoulli trials (column 2), the
number of the Bernoulli trials (column 3), and the covariates
(columns 4+).
Function rmlogit
generates a random sample that is saved as
an object of class mlogit
.
An object of class mlogit
contains a matrix with four or
more columns, that stores, respectively, the group/cluster
membership (column 1), the number of ones or successes in the
Bernoulli trials (column 2), the number of the Bernoulli trials
(column 3), and the covariates (columns 4+).
It also has two additional attributes that facilitate the
computing by function cmmms
. The first attribute is
ui
, which stores the unique values of group memberships,
and the second is gi
, the number of observations in each
unique group.
It is convenient to use function mlogit
to create an object
of class mlogit
.