Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/actionscript-3/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Stata 如何从以前存储的估算中访问元素_Stata - Fatal编程技术网

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