Dear Gretl Community,
I'm trying to replicate the slope calculations that Gretl exhibits on Probit
estimation. In most of the time I can replicate exactly the same numbers,
but there are some cases that I can not (i.e. the values are different).
Please take a look at the following Hansl code:
<hansl>
set messages off
set echo off
############ Ok! #############
open transport.gdt
probit auto autotime bustime
list lista = $xlist
loop foreach i lista --quiet
series med_$i = mean($i)
endloop
list med_lista = med_*
matrix med_me_matrix = dnorm(lincomb(med_lista, $coeff))*$coeff'
matrix me = med_me_matrix[1,]
printf "\nMarginal effects:\n %12.6f \n", me
############ Not ok! #############
open greene19_1
probit GRADE GPA PSI
list lista = $xlist
loop foreach i lista --quiet
series med_$i = mean($i)
endloop
list med_lista = med_*
matrix med_me_matrix = dnorm(lincomb(med_lista, $coeff))*$coeff'
matrix me = med_me_matrix[1,]
printf "\nThe marginal effects: %12.8f \n", me
</hansl>
Thanks in advance,
Henrique Andrade