Announcement

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

  • Calculate economic significance for censored (Tobit) regression with multiple imputation

    Hi,

    I'm trying to calculate economic significance from a censored (Tobit) regression with multiple imputation according to this definition:

    "Economic significance is indicated by the predicted change in the dependent variable from a movement from the tenth to the ninetieth percentile in the independent variable as a percentage of the mean of the dependent variable".



    So far I have the following code (with y being my dependent variable, and x being my independent variable(s)):

    mi register y x
    mi impute mvn y x, add(10)
    mi estimate, cmdok post: tobit y x, ll(0) ul(1) vce(robust)



    I have tried using the following code (which works without mi estimate) immediately after the above:

    sum y, meanonly
    local y=r(mean)
    margins, expression(predict(ystar(0,1))/`y_m') at((p10) x) at((p90) x) contrast(atcontrast(ar._at) marginswithin) atmeans



    But I get the error:

    e(sample) does not identify the estimation sample



    Any help would be very much appreciated! :-)


    Best regards,
    Valdemar

  • #2
    I did some more digging, and found this promising thread:

    https://www.statalist.org/forums/for...design-mimrgns


    Unfortunately, I still can't get it to work. I adapted the code proposed by daniel klein as shown below:

    Code:
    mi register y x
    mi impute mvn y x, add(10)
    mi estimate, cmdok post: tobit y x, ll(0) ul(1) vce(robust)
    
    capture program drop mimargins
    program mimargins, eclass properties(mi)
    svy: tobit y x, ll(0) ul(1) vce(robust)
    sum y, meanonly
    local y_m=r(mean)
    margins, expression(predict(ystar(0,1))/`y_m') at((p10) x) at((p90) x) contrast(atcontrast(ar._at) marginswithin) atmeans post
    end
    
    mi estimate: mimargins, expression(predict(ystar(0,1))/`y_m') at((p10) x) at((p90) x) contrast(atcontrast(ar._at) marginswithin) atmeans

    When running the code, I get the error "varlist specification required" after mi estimate: mimargins ... .


    Once again, any help would be very much appreciated.
    Last edited by Valdemar Meng; 25 Jan 2023, 06:16.

    Comment

    Working...
    X