From: cyd on
Hi,

Could anyone help how I can compute log likelihood of a multinomial logistic regression model ? I want to calculate a pseudo r2 value.

[B,dev,stats]=mnrfit(X,Y,'model','nominal','interactions','on','estdisp','on');
[PHAT]=mnrval(B,X)

Kind regards,

cyd
From: Peter Perkins on
cyd wrote:
> Hi,
>
> Could anyone help how I can compute log likelihood of a multinomial logistic regression model ? I want to calculate a pseudo r2 value.
>
> [B,dev,stats]=mnrfit(X,Y,'model','nominal','interactions','on','estdisp','on');
> [PHAT]=mnrval(B,X)

Usually it's the deviance that you want, i.e., the second output of MNRFIT, but if you really want to compute the log-likelihood, use the output of MNRVAL and MNPDF to compute the probabilities of the observed data and then log and sum it.