# [R] Likelihood Function for Multinomial Logistic Regression and its partial derivatives

Ronggui Huang ronggui.huang at gmail.com
Mon Aug 3 03:33:18 CEST 2009

```You may refer to mlogit for the ordinary multinomial regression. As
fas as I know, there are no functions for multilevel multinomial
regression.

Ronggui

2009/8/2 nikolay12 <nikolay12 at gmail.com>:
>
> Hi,
>
> I would like to apply the L-BFGS optimization algorithm to compute the MLE
> of a multilevel multinomial Logistic Regression.
>
> The likelihood formula for this model has as one of the summands the formula
> for computing the likelihood of an ordinary (single-level) multinomial logit
> regression. So I would basically need the R implementation for this formula.
> The L-BFGS algorithm also requires computing the partial derivatives of that
> formula in respect to all parameters. I would appreciate if you can point me
> to existing implementations that can do the above.
>
> Nick
>
> PS. The long story for the above:
>
> My data is as follows:
>
> - a vector of observed values (lenght = D) of the dependent multinomial
> variable each element belonging to one of N levels of that variable
>
> - a matrix of corresponding observed values (O x P) of the independent
> variables (P in total, most of them are binary but also a few are
> integer-valued)
>
> - a vector of current estimates (or starting values) for the Beta
> coefficients of the independent variables (length = P).
>
> This data is available for 4 different pools. The partially-pooled model
> that I want to compute has as a likelihood function a sum of several
> elements, one being the classical likelihood function of a multinomial logit
> regression for each of the 4 pools.
>
> This is the same model as in Finkel and Manning "Hierarchical Bayesian
> Domain Adaptation" (2009).
>
> --
> View this message in context: http://www.nabble.com/Likelihood-Function-for-Multinomial-Logistic-Regression-and-its-partial-derivatives-tp24772731p24772731.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

--
HUANG Ronggui, Wincent
PhD Candidate
Dept of Public and Social Administration
City University of Hong Kong