Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to graph the averge marginal effect of probit model (spline approach)

    Dear Statalist,

    I am using -mkspline- and -probit- command to calculate the average marginal effect of probit model.

    below are my command:
    Code:
    mkspline HAF21 0 HAF22= HAF2 
    
    probit open  l.HAF21 l.HAF22 l.lncv222 l.lncv1 l.HERF l.cv41   l.cv61 l.cv7 i.yr indc1-indc28,vce(robust)  nocon
    margins , dydx(l.HAF21 l.HAF22 l.lncv222 l.lncv1 l.HERF l.cv41   l.cv61 l.cv7) atmeans post
    In order to display it by graph like this, is there any command in stata to graph the averge marginal effect of probit model (spline approach)?

    Click image for larger version

Name:	2153_1.png
Views:	1
Size:	33.2 KB
ID:	1387112


    Thanks in advance,
    David

  • #2
    After margins, you can use marginsplot. If you really have difficulty, you can do a set of margins, and then copy the margins along with x variables into a new set of variables to plot.

    Comment

    Working...
    X