rny867966 发表于 2025-5-28 17:05 
这个是mata函数本身存在的问题,门槛变量不能放到dthres中。我在操作中新定义了一个变量,让他等于门槛变 ...
use DurlaufJohnson.dta,clear
thregs GDP_Growth Pop_Growth school, thres(
GDP) dthres(log_GDP InvGDP
GDP) reps(300) qn(400) trim(0.15)
上传不了图片,直接复制粘贴结果供参考:
Bootstrap for single threshold
.................................................. + 50
.................................................. + 100
.................................................. + 150
.................................................. + 200
.................................................. + 250
.................................................. + 300
Threshold estimator (level = 95):
-----------------------------------------------------
model | Threshold Lower Upper
-----------+-----------------------------------------
Th-1 | 3085.0000 833.0000 4229.0000
-----------------------------------------------------
Threshold effect test (bootstrap = 300):
--------------------------------------------------------------------
Threshold | RSS Fstat Prob Crit10 Crit5 Crit1
-----------+--------------------------------------------------------
Single | 8.0911 17.76 0.0033 7.1936 9.2130 12.0215
--------------------------------------------------------------------
Source | SS df MS Number of obs = 96
-------------+---------------------------------- F(8, 87) = 14.02
Model | 10.4321412 8 1.30401765 Prob > F = 0.0000
Residual | 8.09109048 87 .09300104 R-squared = 0.5632
-------------+---------------------------------- Adj R-squared = 0.5230
Total | 18.5232317 95 .194981386 Root MSE = .30496
--------------------------------------------------------------------------------
GDP_Growth | Coefficient Std. err. t P>|t| [95% conf. interval]
---------------+----------------------------------------------------------------
Pop_Growth | -.609533 .3004388 -2.03 0.046 -1.206688 -.0123784
school | .2412249 .0599962 4.02 0.000 .1219759 .3604739
|
_cat#c.log_GDP |
0 | -1.198598 .2876791 -4.17 0.000 -1.770392 -.6268047
1 | -.9111309 .2299833 -3.96 0.000 -1.368248 -.4540142
|
_cat#c.InvGDP |
0 | .3929841 .0924286 4.25 0.000 .2092724 .5766959
1 | .6737485 .1926969 3.50 0.001 .2907424 1.056755
|
_cat#c.GDP |
0 | .0008118 .0002141 3.79 0.000 .0003861 .0012374
1 | .0000815 .000043 1.89 0.062 -4.05e-06 .000167
|
_cons | 7.865568 1.987447 3.96 0.000 3.915301 11.81583
--------------------------------------------------------------------------------