使用tobit
命令帮助文件中的第一个示例:
. sysuse auto, clear
. generate wgt = weight / 1000
. tobit mpg wgt, ll(17)
Tobit regression Number of obs = 74
LR chi2(1) = 72.85
Prob > chi2 = 0.0000
Log likelihood = -164.25438 Pseudo R2 = 0.1815
------------------------------------------------------------------------------
mpg | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
wgt | -6.87305 .7002559 -9.82 0.000 -8.268658 -5.477442
_cons | 41.49856 2.05838 20.16 0.000 37.39621 45.6009
-------------+----------------------------------------------------------------
/sigma | 3.845701 .3663309 3.115605 4.575797
------------------------------------------------------------------------------
18 left-censored observations at mpg <= 17
56 uncensored observations
0 right-censored observations
您可以轻松地从返回的结果中获取任何 p 值r()
:
. matrix list r(table)
r(table)[9,3]
model: model: sigma:
wgt _cons _cons
b -6.8730504 41.498557 3.8457011
se .70025591 2.0583803 .36633085
t -9.8150552 20.160782 .b
pvalue 5.610e-15 1.471e-31 .b
ll -8.2686584 37.396211 3.1156048
ul -5.4774424 45.600903 4.5757975
df 73 73 73
crit 1.9929971 1.9929971 1.9929971
eform 0 0 0
然后相应地格式化它:
. matrix results = r(table)
. display %18.17f results[4,1]
0.00000000000000561
在 Stata 的命令提示符下键入help format
以获取更多信息。