当在 Stata 中使用具有内生处理效果的调查数据和回归时,诊断和后估计部分的数量将停止使用。
svy: etregress logwage i.race gender, treat(training = i.education gender)
--------------------------------------------------------------------------------------------------
| Linearized
| Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------------------------------+----------------------------------------------------------------
logwage |
race |
African American | .3891554 .0031105 12.20 0.000 .2000000 .8474752
Asian American | .1487310 .0002843 04.11 0.000 .027113 .8765290
|
gender |
female | -.0230411 .010445 -6.85 0.000 -.115341 -.0107295
|
1.training | .3703371 .0451778 10.61 0.000 .2018037 .4186134
---------------------------------+----------------------------------------------------------------
training |
i.education |
Highschool | -.0715731 .0490565 1.28 0.098 -.1106579 .1291781
College | .1271380 .0401052 3.95 0.003 .0329516 .2107563
Grad School | .8522143 .0085337 8.99 0.000 .8271381 .9573284
|
gender |
female | .0127444 .0100058 5.33 0.041 .0100558 .0866312
_cons | -1.260083 .0327235 -26.12 0.000 -1.531405 -1.098524
---------------------------------+----------------------------------------------------------------
/athrho | .0051552 .031410 0.17 0.827 -.0722533 .0810246
/lnsigma | -1.872551 .0166818 -73.50 0.000 -1.928624 -1.278064
---------------------------------+----------------------------------------------------------------
rho | .0084120 .0421116 -.0649947 .0888529
sigma | .4000831 .0038170 .1925127 .5067780
lambda | .0012673 .0226365 -.0324029
当我有这个模型时,与线性模型相关的简单假设如下:检查线性或独立性假设以及同方差性、正态性或拟合优度诊断不给出输出。
残差与预测值图可能是 a rvfplot
,但这会产生错误:
没有找到最后的估计
尝试estat gof
给出
无效的子命令 gof
和同样的estat hettest
help etregress postestimation
不讨论我们通常在 Stata 中使用回归或对数线性模型看到的模型假设检验或拟合优度检验。
当我尝试predict residual
或predict rstudent
没有报告时,再次无法进行绘图。
我可以通过其他人给出的参考提供可重现的问题示例:
webuse nhanes2f, clear
qui svyset psuid [pweight=finalwgt], strata(stratid)
qui svy: etregress loglead i.female i.diabetes, treat(diabetes = weight age height i.female) // coefl
nlcom pct_eff:(100*(exp(_b[loglead:1.female])-1))
在这里,etregress 也与对数转换的因变量和处理组件一起使用。按照上面提到的这个模型,我们如何检查假设和拟合优度?