yinung at Gmail schrieb:
This is what I got (the script is attached in the bottom of this mail).
The difference is quiet large. test = -0.108229
I use gretl for windows build date 2010-03-26
It seems to me you're asking in your script for the wrong $rsq (you're
asking one model too late, so to speak)
<script>
nulldata 10
set seed 89675430
series u=normal()
series y=(u>0)
series x = uniform()
probit y const x
scalar lnL=$lnl
this is the place where you should store $rsq
probit y const
scalar lnL0=$lnl
# McFadden R-squared as in Greene's Econometric Analysis
scalar McR2= 1-lnL/lnL0
scalar McR2_gretl = $rsq # added
this is saving the $rsq of the last model without x, 0 by definition
scalar test = McR2_gretl - McR2 # added
</script>
-sven