楼主: ywh19860616
3014 8

[其他] 命令其余结果显示问题 [推广有奖]

已卖:3份资源

学术权威

32%

还不是VIP/贵宾

-

威望
0
论坛币
725 个
通用积分
4339.8247
学术水平
867 点
热心指数
1004 点
信用等级
649 点
经验
116372 点
帖子
3968
精华
0
在线时间
7743 小时
注册时间
2009-9-3
最后登录
2025-9-7

楼主
ywh19860616 发表于 2011-9-23 14:17:14 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
在一个命令中,往往只是把主要结果显示出来的,我想显示其余的,应该如何操作?
比如命令xtrc 命令
Saved results

    xtrc saves the following in e():

    Scalars        
      e(N)                number of observations
      e(N_g)              number of groups
      e(df_m)             model degrees of freedom
      e(chi2)             chi-squared
      e(chi2_c)           chi-squared for comparison test
      e(df_chi2c)         degrees of freedom for comparison chi-squared test
      e(g_min)            smallest group size
      e(g_avg)            average group size
      e(g_max)            largest group size
      e(rank)             rank of e(V)

    Macros         
      e(cmd)              xtrc
      e(cmdline)          command as typed
      e(depvar)           name of dependent variable
      e(ivar)             variable denoting groups
      e(title)            title in estimation output
      e(offset)           offset
      e(chi2type)         Wald; type of model chi-squared test
      e(vce)              vcetype specified in vce()
      e(vcetype)          title used to label Std. Err.
      e(properties)       b V
      e(predict)          program used to implement predict
      e(marginsnotok)     predictions disallowed by margins
      e(asbalanced)       factor variables fvset as asbalanced
      e(asobserved)       factor variables fvset as asobserved

    Matrices      
      e(b)                coefficient vector
      e(Sigma)            Sigma hat matrix
      e(beta_ps)          matrix of best linear predictors
      e(V)                variance-covariance matrix of the estimators
      e(V_ps)             matrix of variances for the best linear predictors; row i contains vec of
                            variance matrix for group i predictor


对于Scalars 中的,如e(N),那直接display e(N)就行了

我想问下,怎么显示第三部份 矩阵 Matrices的内容?

如e(b),display e(b)会出错
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:结果显示 observations observation coefficient Predictions comparison following average freedom number

沙发
蓝色 发表于 2011-9-23 14:53:43
matrix list e(b)
已有 1 人评分学术水平 热心指数 信用等级 收起 理由
ywh19860616 + 1 + 1 + 1 好的建议

总评分: 学术水平 + 1  热心指数 + 1  信用等级 + 1   查看全部评分

藤椅
ywh19860616 发表于 2011-9-23 14:56:14
蓝色 发表于 2011-9-23 14:53
matrix list e(b)
好的建议,谢谢
一份耕耘,一份收获。

板凳
ywh19860616 发表于 2011-11-12 21:30:11
蓝色 发表于 2011-9-23 14:53
matrix list e(b)
版主,我想问下能不能看macros中的内容
比如xtabond命令,看帮助有:
Macros        
      e(cmd)             xtdpd
      e(cmdline)         command as typed
      e(depvar)          name of dependent variable
      e(twostep)         twostep, if specified
      e(ivar)            variable denoting groups
      e(tvar)            time variable
      e(vce)             vcetype specified in vce()
      e(vcetype)         title used to label Std. Err.
      e(system)          system, if system estimator
      e(hascons)         hascons, if specified
      e(transform)       specified transform
      e(engine)          xtdpd
      e(div_odvars)      differenced variables used as standard instruments for differenced equation and not for level equation
      e(div_olvars)      level variables used as standard instruments for differenced equation and not for level equation
      e(liv_olvars)      level variables used as standard instruments for level equation and not for differenced equation
      e(div_dvars)       differenced variables used as standard instruments for differenced equation
      e(div_lvars)       level variables used as standard instruments for differenced equation
      e(liv_lvars)       level variables used as standard instruments for level equation
      e(dgmmiv_vars)     variables used to create GMM-type instruments for differenced equation
      e(dgmmiv_flag)     first lags of variables used to create GMM-type instruments for differenced equation
      e(dgmmiv_llag)     last lags of variables used to create GMM-type instruments for differenced equation
      e(lgmmiv_vars)     variables used to create GMM-type instruments for level equation
      e(lgmmiv_flag)     first lags used to create GMM-type instruments for level equation
      e(diffvars)        already differenced variables
      e(datasignature)   checksum from datasignature
      e(properties)      b V
      e(estat_cmd)       program used to implement estat      
    e(predict)         program used to implement predict

scalars和matrix都可以看,那macros呢?应该如何利用这个选项
      
一份耕耘,一份收获。

报纸
sungmoo 发表于 2011-11-15 12:25:06
di "`e(cmd)'"
已有 1 人评分学术水平 热心指数 信用等级 收起 理由
ywh19860616 + 1 + 1 + 1 谢谢您

总评分: 学术水平 + 1  热心指数 + 1  信用等级 + 1   查看全部评分

地板
ywh19860616 发表于 2011-11-15 23:01:23
sungmoo 发表于 2011-11-15 12:25
di "`e(cmd)'"
谢谢斑竹
您好,我还是不明白应该如何利用这一功能
比如,我运行如下stata自带例子
webuse abdata
xtabond n l(0/1).w l(0/2).(k ys) yr1980-yr1984, lags(2)

. di "e(cmd)  "
e(cmd)

就只显示了e(cmd),这没有实际意义

e(estat_cmd)       program used to implement estat
按这个提示,是什么意思呢?
一份耕耘,一份收获。

7
蓝色 发表于 2011-11-16 08:01:26
直接
di  e(cmd)


. use auto
(1978 Automobile Data)

. reg   price rep78 headroom

      Source |       SS       df       MS              Number of obs =      69
-------------+------------------------------           F(  2,    66) =    0.43
       Model |  7450346.06     2  3725173.03           Prob > F      =  0.6511
    Residual |   569346613    66  8626463.83           R-squared     =  0.0129
-------------+------------------------------           Adj R-squared = -0.0170
       Total |   576796959    68  8482308.22           Root MSE      =  2937.1

------------------------------------------------------------------------------
       price |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
       rep78 |   69.23416   363.8024     0.19   0.850    -657.1208    795.5892
    headroom |   391.6261   422.1074     0.93   0.357    -451.1385    1234.391
       _cons |   4735.368   1930.863     2.45   0.017      880.276    8590.459
------------------------------------------------------------------------------

. ereturn list

scalars:
                  e(N) =  69
               e(df_m) =  2
               e(df_r) =  66
                  e(F) =  .4318308295439177
                 e(r2) =  .0129167568400803
               e(rmse) =  2937.084239580156
                e(mss) =  7450346.063815951
                e(rss) =  569346612.8057493
               e(r2_a) =  -.0169948565890081
                 e(ll) =  -647.3500832775829
               e(ll_0) =  -647.7986144493904
               e(rank) =  3

macros:
            e(cmdline) : "regress price rep78 headroom"
              e(title) : "Linear regression"
          e(marginsok) : "XB default"
                e(vce) : "ols"
             e(depvar) : "price"
                e(cmd) : "regress"
         e(properties) : "b V"
            e(predict) : "regres_p"
              e(model) : "ols"
          e(estat_cmd) : "regress_estat"

matrices:
                  e(b) :  1 x 3
                  e(V) :  3 x 3

functions:
             e(sample)   

. di  e(cmd)
regress

已有 1 人评分学术水平 热心指数 信用等级 收起 理由
ywh19860616 + 1 + 1 + 1 谢谢斑竹,明白了

总评分: 学术水平 + 1  热心指数 + 1  信用等级 + 1   查看全部评分

8
sungmoo 发表于 2011-11-16 11:51:23
注意:di "e(cmd)"与di "`e(cmd)'"不一样。
已有 1 人评分学术水平 热心指数 信用等级 收起 理由
ywh19860616 + 1 + 1 + 1 谢谢您,明白了

总评分: 学术水平 + 1  热心指数 + 1  信用等级 + 1   查看全部评分

9
ywh19860616 发表于 2011-11-16 12:07:35
蓝色 发表于 2011-11-16 08:01
直接
di  e(cmd)
谢谢,明白了
开始我理解错了
一份耕耘,一份收获。

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注jltj
拉您入交流群
GMT+8, 2026-1-27 04:48