Stata 如何从以前存储的估算中访问元素
假设我已使用此数据运行这些回归并存储输出:Stata 如何从以前存储的估算中访问元素,stata,Stata,假设我已使用此数据运行这些回归并存储输出: eststo clear sysuse auto2, clear eststo e_mpg: reg price mpg eststo e_trunk: reg price trunk 我现在希望能够访问e\u mpg的\u b和\u se组件 我可以通过以下方式查看它们: estimates replay e_mpg 但是,运行以下操作不起作用: estimates use e_mpg 基本上,我希望将这些估计值保存在当前内存中,以便访问\u
eststo clear
sysuse auto2, clear
eststo e_mpg: reg price mpg
eststo e_trunk: reg price trunk
我现在希望能够访问e\u mpg
的\u b
和\u se
组件
我可以通过以下方式查看它们:
estimates replay e_mpg
但是,运行以下操作不起作用:
estimates use e_mpg
基本上,我希望将这些估计值保存在当前内存中,以便访问
\u se[…]
和\u b[…]
,或者,如果不可能,从返回列表
或返回列表
或其他解决方案中访问某些内容 您需要使用估计还原
:
eststo clear
sysuse auto2, clear
eststo e_mpg: regress price mpg
eststo e_trunk: regress price trunk
estimates restore e_mpg
(results e_mpg are active now)
matrix list e(b)
e(b)[1,2]
mpg _cons
y1 -238.89435 11253.061
display _b[mpg]
-238.89435
display _se[mpg]
53.076687
您需要使用
估计值还原
:
eststo clear
sysuse auto2, clear
eststo e_mpg: regress price mpg
eststo e_trunk: regress price trunk
estimates restore e_mpg
(results e_mpg are active now)
matrix list e(b)
e(b)[1,2]
mpg _cons
y1 -238.89435 11253.061
display _b[mpg]
-238.89435
display _se[mpg]
53.076687