Hi all,
I am working through a causal mediation analysis and attempted to plot effects of the results from the "mediate" command. Stata returned an error after running "estat effectsplot", suggesting that a temporary variable was not found:
I then went back to the Stata manual and attempted to reproduce the output from code in section "Example 10: Causal mediation model with continuous treatment", found on page 218 of manual "STATA CAUSAL INFERENCE AND TREATMENT EFFECTS ESTIMATION REFERENCE MANUAL. RELEASE 18". However, this returned the same error.
I have not found any other posts on Statalist or other sites regarding this issue. I wanted to check if anyone else has had this issue, indicating that it might be an environment-specific issue, or if it is a bug? My primary suspicion is that this is due to the limitations of BE variable limits, but would appreciate some clarification/confirmation.
Stata is up-to-date.
Stata/BE 18 for Windows (64-bit x86-64)
Full output from attempted reproduction of Stata example 10:
I am working through a causal mediation analysis and attempted to plot effects of the results from the "mediate" command. Stata returned an error after running "estat effectsplot", suggesting that a temporary variable was not found:
Code:
variable __00000H not found
I have not found any other posts on Statalist or other sites regarding this issue. I wanted to check if anyone else has had this issue, indicating that it might be an environment-specific issue, or if it is a bug? My primary suspicion is that this is due to the limitations of BE variable limits, but would appreciate some clarification/confirmation.
Stata is up-to-date.
Stata/BE 18 for Windows (64-bit x86-64)
Full output from attempted reproduction of Stata example 10:
Code:
. use https://www.stata-press.com/data/r18/birthweight, clear (Fictional birthweight data) . . summarize ses Variable | Obs Mean Std. dev. Min Max -------------+--------------------------------------------------------- ses | 2,000 7.804412 2.287496 1.304026 16.27844 . generate std_ses = (ses-r(mean))/r(sd) . . mediate (bweight sespar c.age##c.age, expmean) (ncigs sespar c.age##c.age, poisson) (std_ses, continuous(0 -2 -1 1 2)), nointeract Iteration 0: EE criterion = 1.470e-12 Iteration 1: EE criterion = 2.769e-17 Causal mediation analysis Number of obs = 2,000 Outcome model: Exponential mean Mediator model: Poisson Mediator variable: ncigs Treatment type: Continuous Continuous treatment levels: 0: std_ses = 0 (control) 1: std_ses = -2 2: std_ses = -1 3: std_ses = 1 4: std_ses = 2 ------------------------------------------------------------------------------ | Robust bweight | Coefficient std. err. z P>|z| [95% conf. interval] -------------+---------------------------------------------------------------- NIE | std_ses | (1 vs 0) | -276.2757 27.69004 -9.98 0.000 -330.5471 -222.0042 (2 vs 0) | -100.1155 9.170566 -10.92 0.000 -118.0894 -82.14148 (3 vs 0) | 65.84585 5.423096 12.14 0.000 55.21678 76.47493 (4 vs 0) | 110.1346 8.724232 12.62 0.000 93.03538 127.2337 -------------+---------------------------------------------------------------- NDE | std_ses | (1 vs 0) | -170.9012 31.33649 -5.45 0.000 -232.3196 -109.4828 (2 vs 0) | -86.56069 16.08129 -5.38 0.000 -118.0794 -55.04193 (3 vs 0) | 88.83929 16.94031 5.24 0.000 55.6369 122.0417 (4 vs 0) | 180.0172 34.77372 5.18 0.000 111.8619 248.1724 -------------+---------------------------------------------------------------- TE | std_ses | (1 vs 0) | -447.1769 35.41401 -12.63 0.000 -516.5871 -377.7667 (2 vs 0) | -186.6761 15.73291 -11.87 0.000 -217.5121 -155.8402 (3 vs 0) | 154.6851 16.31969 9.48 0.000 122.6991 186.6712 (4 vs 0) | 290.1517 33.85571 8.57 0.000 223.7958 356.5077 ------------------------------------------------------------------------------ Note: Outcome equation does not include treatment–mediator interaction. . . estat effectsplot variable __000003 not found r(111); end of do-file r(111);
Comment