==============================================
mclogit: Mixed conditional logit models in R
==============================================
.. toctree::
:hidden:
mclogit on CRAN
.. division:: left-aligned a-no-ul
|Travis build status|
|Current release on GitHub|
|CRAN|
|Total downloads from RStudio CRAN mirror|
|Monthly downloads from RStudio CRAN mirror|
The package 'mclogit' implements the estimation of *mixed conditional
logit* models via the PQL method as used in my
`article `__
published in *Electoral Studies*. It is published on
`CRAN `__. Development occurs
on `GitHub `__, where both
`releases `__ and the
`development tree `__ can be found.
The probability that individual :math:`i` chooses alternative :math:`j`
from choice set :math:`\mathcal{S}_i` is
.. math::
\pi_{ij} = \frac{\exp(\eta_{ij})}{\sum_{k\in\mathcal{S}_i}\exp(\eta_{ik})}
with
.. math::
\eta_{ij}=\beta_1x_{1ij}+\cdots+\beta_qx_{qij}+U_{ij}
where :math:`x_{hij}` are values of independent variables,
:math:`\beta_h` are parameters (coefficients), and :math:`U_{ij}` are
random effects with a normal distribution.
The package allows to specify that random effects are equal for all
individuals within clusters :math:`\mathcal{C}_c`, that is
:math:`U_{i_1j}=U_{i_2j}` for :math:`i_1\in\mathcal{C}_c` and
:math:`i_2\in\mathcal{C}_c`, where such clusters also may be nested in a
"multi-level" manner.
The "dependent variable" :math:`y_{ij}` may be a "dummy variable" that
is equal to 1 if individual :math:`i` has chosen alternative :math:`j`
and 0 if s/he has chosen another alternative. For example, if all
individuals :math:`i` face the same set of five alternatives, then five
values of the dependent variable would correspond to each individual
with only one of the values being equal to one and the other four values
being equal to zero. (This is sometimes called that the data are in
"stacked" format.)
Also, if "covariate classes" of individuals are formed that share the
same values of the independent variables *and* are members of the same
cluster, and :math:`i` indicates such a covariate class, :math:`y_{ij}`
may be the count of individuals from covariate class :math:`i` that have
chosen alternative :math:`j`.
.. |Travis build status| image:: https://travis-ci.org/melff/mclogit.svg?branch=master
:target: https://travis-ci.org/melff/mclogit
.. |Current release on GitHub| image:: https://img.shields.io/github/release/melff/mclogit.svg
:target: https://github.com/melff/mclogit/releases/
.. |CRAN| image:: https://www.r-pkg.org/badges/version/mclogit
:target: https://cran.r-project.org/package=mclogit
.. |Total downloads from RStudio CRAN mirror| image:: https://cranlogs.r-pkg.org/badges/grand-total/mclogit
:target: https://cran.r-project.org/web/packages/mclogit/index.html
.. |Monthly downloads from RStudio CRAN mirror| image:: https://cranlogs.r-pkg.org/badges/mclogit
:target: https://cran.r-project.org/web/packages/mclogit/index.html