Announcement

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

  • Computing Partial Effect and Average Partial Effect of Binary Variables

    I tried to compute the PE and the APE of a dummy using the usual
    Code:
    margins
    command. However, I get 0 as result...

    I tried to compute it "manually" using the difference between the normals evaluated at mean values for the PE and the estimate time the density evaluated at the linear prediction for the APE, yet Stata gives me 0 as result even in this case... What should I do?


    Code:
    #delimit;
    * PE high_school_graduates *;
    
    
    scalar PE_hsg = normal(_b[_cons] + 
                       _b[ran_profit_margin]*Mrpm + _b[prob_sales]*Mprbsls +
                       _b[regular_clients]*Mrgcl + _b[high_school_graduate]+ 
                       _b[female_employees]*(Mfe)) -
                       normal(_b[_cons] + 
                       _b[ran_profit_margin]*Mrpm + _b[prob_sales]*Mprbsls +
                       _b[regular_clients]*Mrgcl + 
                       _b[female_employees]*Mfe);
                       
    margins, dydx(high_school_graduate) atmeans;
    di PE_hsg;
    
    
    * APE high_school_graduate*;
    
    qui gen APE_hsg = _b[high_school_graduate]*normalden(xb);
    margins, dydx(high_school_graduate);
    sum APE_hsg if followup == 0 & treatment == 1;
    M* stands for the mean value of the variable.

  • #2
    Sorry, I just realized that my categorical variable was omitted from the probit regression because it perfectly predicts participation, (I was looking at the LPM table),

    Delete, my bad.

    Comment

    Working...
    X