On Mon, 19 Apr 2010, yinung at Gmail wrote:
Thanks, Allin
2010/4/19 Allin Cottrell <cottrell(a)wfu.edu>
>
> If I run your script as modified I get a "test" value of
> 1.665e-16, which doesn't seem like a problem. What are you seeing?
>
> Allin
> _______________________________________________
>
This is what I got (the script is attached in the bottom of this mail). The
difference is quiet large. test = -0.108229
[snip]
<script>
nulldata 10
set seed 89675430
series u=normal()
series y=(u>0)
series x = uniform()
probit y const x
scalar lnL=$lnl
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
scalar test = McR2_gretl - McR2 # added
</script>
You need to save "McR2_gretl" before estimating the constant-only
model, as in the version I showed.
Allin