[Gretl-users] Logit: Conditional marginal effects+S.E.

Artur T. artur.tarassow at googlemail.com
Wed Nov 2 15:54:35 EDT 2016


Dear Oleh,

thanks for this. Your project sounds very ambitious! I got an example
from Claudia Pigini which I'll try first.

But if you need some people testing your package, just let me know!

Best,
Artur

Am 02.11.2016 um 18:21 schrieb oleg_komashko at ukr.net:
> A am working a new package which
> can deal with functions of indepenndent
> variables, discrete variables
> Also there ia a function for CI
> Currenly it can deal with linear models
> olsl, wls ,hsk tsls etc.
> binary and ordered logit probit and
> poisson negbin
> I can send prerelease version
> The bug info also can be useful for me
> A fairly small package, now only
> about 4000 lines
> 
> Oleh
> 
> 
> 
> 2 листопада 2016, 18:02:04, від "Artur T."
> <artur.tarassow at googlemail.com <mailto:artur.tarassow at googlemail.com>>:
> 
>     Dear all,
> 
>     I am just preparing lecture notes for Logit exercises. STATA is the
>     default software used in teaching. However, usually I also  provide
>     gretl examples to the students.
> 
>     I want to compute the conditional marginal effects of x on the binary
>     variable y over a range of x-values; not just at the mean. For this I am
>     using Allin's "lp-mfx" function -- which works just fine -- in a loop
>     (see the example below).
> 
>     However, is there is an easy way (without manipulating Allin's package)
>     to replicate Stata's marginsplot() command which also reports confidence
>     intervals? See here:
>     http://www.ats.ucla.edu/stat/stata/faq/margins_graph12.htm
> 
>     Thanks,
>     Artur
> 
> 
>     <hansl>
>     set echo off
>     set messages off
> 
>     open keane.gdt -q
>     include lp-mfx.gfn
> 
>     logit manuf const lwage
>     #bundle b = binary_mfx(lwage, $xlist, $coeff, $vcv, $sample,1)
>     #lp_mfx_print(&b)
> 
>     matrix xeduc = seq(0,max(educ),1)'
>     matrix x = ones(rows(xeduc),1)~xeduc
>     matrix dp_dx = zeros(rows(x),1)
>     loop i=1..rows(x) -q
>         dp_dx[i] = binary_dp_dx($coeff, $xlist, x[i,], 1)
>     endloop
>     matrix mplot = dp_dx ~ xeduc
>     gnuplot 1 2 --matrix=mplot --with-lines --fit=none --output=display \
>       { set arrow from 50,graph(0,0) to 50,graph(1,1) nohead ; \
>       set title 'Conditional marginal effects of lwage' ; \
>       set ylabel 'Effects on Pr(manuf)' ; \
>       set xlabel 'lwage'; }
>     </hansl>
>     _______________________________________________
>     Gretl-users mailing list
>     Gretl-users at lists.wfu.edu <mailto:Gretl-users at lists.wfu.edu>
>     http://lists.wfu.edu/mailman/listinfo/gretl-users
> 
> !
> 
> 
> _______________________________________________
> Gretl-users mailing list
> Gretl-users at lists.wfu.edu
> http://lists.wfu.edu/mailman/listinfo/gretl-users
> 


More information about the Gretl-users mailing list