Announcement

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

  • margins after suest: "Warning: cannot perform check for estimable functions"

    Can anyone point me to documentation describing why the above warning is issued when factor variables are used but not when their non-factor-variable counterparts are used? Thanks in advance for any suggestions.

    Here is some sample code:
    Code:
    cap preserve
    cap drop _all
    set obs 1000
    forval j=1/2 {
     gen x`j'=uniform()>.5
     gen y`j'=uniform()>.5
    }
    forval j=1/2 {
     qui probit y`j' x1 x2
     est store e`j'
    }
    qui suest e1 e2
    
    margins, dydx(*) exp(normal(xb(e1_y1))+normal(xb(e2_y2)))
    
    est clear
    
    forval j=1/2 {
     qui probit y`j' i.(x1 x2)
     est store e`j'
    }
    qui suest e1 e2
    
    margins, dydx(*) exp(normal(xb(e1_y1))+normal(xb(e2_y2)))
    
    cap restore
    And here are its results:
    Code:
    . cap preserve
    
    . cap drop _all
    
    . set obs 1000
    number of observations (_N) was 0, now 1,000
    
    . forval j=1/2 {
      2.  gen x`j'=uniform()>.5
      3.  gen y`j'=uniform()>.5
      4. }
    
    . forval j=1/2 {
      2.  qui probit y`j' x1 x2
      3.  est store e`j'
      4. }
    
    . qui suest e1 e2
    
    .
    . margins, dydx(*) exp(normal(xb(e1_y1))+normal(xb(e2_y2)))
    
    Average marginal effects                        Number of obs     =      1,000
    Model VCE    : Robust
    
    Expression   : normal(xb(e1_y1))+normal(xb(e2_y2))
    dy/dx w.r.t. : x1 x2
    
    ------------------------------------------------------------------------------
                 |            Delta-method
                 |      dy/dx   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
              x1 |   .0124886   .0449718     0.28   0.781    -.0756545    .1006318
              x2 |   .0287027   .0449262     0.64   0.523    -.0593509    .1167563
    ------------------------------------------------------------------------------
    
    .
    . est clear
    
    .
    . forval j=1/2 {
      2.  qui probit y`j' i.(x1 x2)
      3.  est store e`j'
      4. }
    
    . qui suest e1 e2
    
    .
    . margins, dydx(*) exp(normal(xb(e1_y1))+normal(xb(e2_y2)))
    Warning: cannot perform check for estimable functions.
    
    Average marginal effects                        Number of obs     =      1,000
    Model VCE    : Robust
    
    Expression   : normal(xb(e1_y1))+normal(xb(e2_y2))
    dy/dx w.r.t. : 1.x1 1.x2
    
    ------------------------------------------------------------------------------
                 |            Delta-method
                 |      dy/dx   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
            1.x1 |   .0124926   .0449882     0.28   0.781    -.0756827    .1006678
            1.x2 |   .0287057   .0449403     0.64   0.523    -.0593756    .1167871
    ------------------------------------------------------------------------------
    Note: dy/dx for factor levels is the discrete change from the base level.
    
    .
    . cap restore
    
    .
    end of do-file
Working...
X