Mcfadden R2, Mcfadden Pseudo R2, Count R2 and Predictive R2 for Cross Nested Logit Model

205 views
Skip to first unread message

Farzana Khatun

unread,
Feb 5, 2021, 2:32:10 AM2/5/21
to Biogeme
Hello, 

I am working with a cross nested logit model by using Bison Biogeme. It reports Adjusted rho square for the model. However, I like to know the Mcfadden R2, Mcfadden Pseudo R2, Count R2, and Predictive R2 values. Could anyone kindly help me with that? How do I get these values from the software? Or, is it possible to calculate these manually? 

Thank you. 
Regards 
Farzana  

Bierlaire Michel

unread,
Feb 5, 2021, 2:34:29 AM2/5/21
to fkh...@uci.edu, Bierlaire Michel, Biogeme
I would suggest to use the latest version of Biogeme, in Python. See biogeme.epfl.ch.
It gives you access to the raw estimation results, so that you can calculate any indicator that you deem useful. 

--
You received this message because you are subscribed to the Google Groups "Biogeme" group.
To unsubscribe from this group and stop receiving emails from it, send an email to biogeme+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/biogeme/37f61b84-8c4b-44d0-9011-1992d8d783d4n%40googlegroups.com.

Mat Guy

unread,
Jul 20, 2023, 3:27:06 PM7/20/23
to Biogeme
Dear Mr Bierlaire,

I tried to calculate the final McFadden R² using the initial likelihood ratio test on the one hand* and using the initial rho square on the other hand** to calculate the log likelihood for the null model. However, I do not find the same results using the two different variables and from two identical estimations.
* L0=(L*initial)-(initial likelihood ratio test)/2
** L0=(L*initial)/(1-initial rho-square)
Is there an explanation for that?

Thanks in advance for your answer, best regards,
Mr Guyon

Bierlaire Michel

unread,
Jul 20, 2023, 3:53:09 PM7/20/23
to math...@orange.fr, Bierlaire Michel, Biogeme
The initial model is not always the null model.
In order to include the likelihood of the null model in the results, you need to add the statement:
the_biogeme.calculateNullLoglikelihood(av)

See https://github.com/michelbierlaire/biogeme/blob/master/examples/swissmetro/b01logit.py
> To view this discussion on the web visit https://groups.google.com/d/msgid/biogeme/113d8802-514d-4941-bf85-bee209adb793n%40googlegroups.com.

Michel Bierlaire
Transport and Mobility Laboratory
School of Architecture, Civil and Environmental Engineering
EPFL - Ecole Polytechnique Fédérale de Lausanne
http://transp-or.epfl.ch
http://people.epfl.ch/michel.bierlaire

Mat Guy

unread,
Jul 20, 2023, 11:06:47 PM7/20/23
to Biogeme
Dear Mr Bierlaire,

Thank you for your help!

Best regards,
Mr Guyon

Reply all
Reply to author
Forward
0 new messages