Thanks, Allin
2010/4/19 Allin Cottrell <cottrell@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
I use gretl for windows build date 2010-03-26

Yi-Nung Yang



>>>>>>>>>>>>>>>>>
gretl version 1.8.7cvs
Current session: 2010-04-19 01:46
? nulldata 10
periodicity: 1, maxobs: 10
observations range: 1-10
? set seed 89675430
Pseudo-random number generator seeded with 89675430
? series u=normal()
Generated series u (ID 2)
? series y=(u>0)
Generated series y (ID 3)
? series x = uniform()
Generated series x (ID 4)
? probit y const x
Convergence achieved after 5 iterations

Model 1: Probit, using observations 1-10
Dependent variable: y

             coefficient   std. error     z       slope 
  -------------------------------------------------------
  const       -1.17560      0.906894    -1.296          
  x            2.31663      2.00475      1.156   0.889540

Mean dependent var   0.400000   S.D. dependent var   0.383980
McFadden R-squared   0.108229   Adjusted R-squared  -0.188942
Log-likelihood      -6.001721   Akaike criterion     16.00344
Schwarz criterion    16.60861   Hannan-Quinn         15.33957

Number of cases 'correctly predicted' = 7 (70.0%)
f(beta'x) at mean of independent vars = 0.384
Likelihood ratio test: Chi-square(1) = 1.45679 [0.2274]

           Predicted
            0   1
  Actual 0  5   1
         1  2   2

? scalar lnL=$lnl
Generated scalar lnL = -6.00172
? probit y const
Convergence achieved after 4 iterations

Model 2: Probit, using observations 1-10
Dependent variable: y

             coefficient   std. error      z      slope
  -----------------------------------------------------
  const       -0.253347     0.400990    -0.6318       

Mean dependent var   0.400000   S.D. dependent var   0.386343
McFadden R-squared   0.000000   Adjusted R-squared  -0.148586
Log-likelihood      -6.730117   Akaike criterion     15.46023
Schwarz criterion    15.76282   Hannan-Quinn         15.12830

Number of cases 'correctly predicted' = 6 (60.0%)
f(beta'x) at mean of independent vars = 0.386

           Predicted
            0   1
  Actual 0  6   0
         1  4   0

? scalar lnL0=$lnl
Generated scalar lnL0 = -6.73012
# McFadden R-squared as in Greene's Econometric Analysis
? scalar McR2= 1-lnL/lnL0
Generated scalar McR2 = 0.108229
? scalar McR2_gretl = $rsq # added
Generated scalar McR2_gretl = 1.11022e-016
? scalar test = McR2_gretl - McR2 # added
Generated scalar test = -0.108229

<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>