Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/loops/2.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,我在Stata中使用用户编写的命令cost,查看模型中变量的估计变化 在运行 regress age allelecount gender htn_g dm_g lipid_g i.hx_smoking b_bmi hx_med_asa if cadhx2==0 我运行cost命令 chest allelecount, backward nograph 但我只得到一个变量的输出 chest allelecount, backward Change-in-estimate regress r

我在Stata中使用用户编写的命令
cost
,查看模型中变量的估计变化

在运行

regress age allelecount gender htn_g dm_g lipid_g i.hx_smoking b_bmi hx_med_asa if cadhx2==0
我运行
cost
命令

chest allelecount, backward nograph
但我只得到一个变量的输出

chest allelecount, backward

Change-in-estimate
regress regression.                    Outcome:  age
number of obs = 476                    Exposure: allelecount

----------------------------------------------------------
Variables |
removed   |    Coef.    [95% Conf.   Interval]   Change, %
----------+-----------------------------------------------
  Adj.All |   -0.3691     -0.6819     -0.0564             
 -lipid_g |   -0.3688     -0.6804     -0.0571     -0.0996 
----------------------------------------------------------

有人能解释一下吗?

使用Stata的自动数据,我发现没有问题:

sysuse auto 
regress  price mpg rep78 headroom

      Source |       SS       df       MS              Number of obs =      69
-------------+------------------------------           F(  3,    65) =    7.51
       Model |   148497605     3  49499201.8           Prob > F      =  0.0002
    Residual |   428299354    65  6589220.82           R-squared     =  0.2575
-------------+------------------------------           Adj R-squared =  0.2232
       Total |   576796959    68  8482308.22           Root MSE      =  2566.9

------------------------------------------------------------------------------
       price |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         mpg |  -289.3462   62.53921    -4.63   0.000    -414.2456   -164.4467
       rep78 |   670.8971   343.5213     1.95   0.055    -15.16242    1356.957
    headroom |  -300.0293   398.0516    -0.75   0.454    -1094.993    494.9346
       _cons |   10921.33   2153.003     5.07   0.000     6621.487    15221.17

chest mpg,backward

Change-in-estimate
regress regression.                    Outcome:  price
number of obs = 69                     Exposure: mpg

----------------------------------------------------------
Variables |
removed   |    Coef.    [95% Conf.   Interval]   Change, %
----------+-----------------------------------------------
  Adj.All |  -289.3462   -411.9208   -166.7715            
-headroom |  -271.6425   -384.8719   -158.4132     -6.1185
   -rep78 |  -226.3607   -332.1613   -120.5600    -16.6697
----------------------------------------------------------

使用Stata的自动数据,我发现没有问题:

sysuse auto 
regress  price mpg rep78 headroom

      Source |       SS       df       MS              Number of obs =      69
-------------+------------------------------           F(  3,    65) =    7.51
       Model |   148497605     3  49499201.8           Prob > F      =  0.0002
    Residual |   428299354    65  6589220.82           R-squared     =  0.2575
-------------+------------------------------           Adj R-squared =  0.2232
       Total |   576796959    68  8482308.22           Root MSE      =  2566.9

------------------------------------------------------------------------------
       price |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         mpg |  -289.3462   62.53921    -4.63   0.000    -414.2456   -164.4467
       rep78 |   670.8971   343.5213     1.95   0.055    -15.16242    1356.957
    headroom |  -300.0293   398.0516    -0.75   0.454    -1094.993    494.9346
       _cons |   10921.33   2153.003     5.07   0.000     6621.487    15221.17

chest mpg,backward

Change-in-estimate
regress regression.                    Outcome:  price
number of obs = 69                     Exposure: mpg

----------------------------------------------------------
Variables |
removed   |    Coef.    [95% Conf.   Interval]   Change, %
----------+-----------------------------------------------
  Adj.All |  -289.3462   -411.9208   -166.7715            
-headroom |  -271.6425   -384.8719   -158.4132     -6.1185
   -rep78 |  -226.3607   -332.1613   -120.5600    -16.6697
----------------------------------------------------------