From: cyd on 9 Dec 2009 19:53 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 10 Dec 2009 01:01 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.
|
Pages: 1 Prev: Error with SSL connection Next: Lookup Table n-D -> How write "Table data"? |