全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
1636 1
2010-10-01
我在解答伍德里奇的《计量经济学导论》中第二章计算机习题的第一题时遇到了困难。
在输入下列命令后:
. infile prate mrate using "D:\My Documents\学期资料\计量经济学\401K.raw",clear
(6136 observations read)

. de
Contains data
  obs:         6,136                          
vars:             2                          
size:        73,632 (99.3% of memory free)
-------------------------------------------------------------------------------
              storage  display     value
variable name   type   format      label      variable label
-------------------------------------------------------------------------------
prate           float  %9.0g                  
mrate           float  %9.0g                  
-------------------------------------------------------------------------------
Sorted by:  
     Note:  dataset has changed since last saved

. sum prate mrate
    Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
       prate |      6136    363.8156     2383.93          0      58811
       mrate |      6136    1300.818    6379.993        .01     140000
显示prate的平均值是363.8156,但是答案说应该是87.36。请问这是怎么回事啊?
二维码

扫码加我 拉你入群

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

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

全部回复
2010-10-1 20:15:57
. use "F:\每天必讀的計量書\Wooldridge, Introductory Econometrics A Modern Approach,  4e\Data Sets\Stata\032458162
> 9_129466\401K.DTA", clear

. de

Contains data from F:\每天必讀的計量書\Wooldridge, Introductory Econometrics A Modern Approach,  4e\Data Sets\Sta
> ta\0324581629_129466\401K.DTA
  obs:         1,534                          
vars:             8                          9 Jun 1998 08:20
size:        46,020 (99.9% of memory free)
-----------------------------------------------------------------------------------------------------------------
              storage  display     value
variable name   type   format      label      variable label
-----------------------------------------------------------------------------------------------------------------
prate           float  %7.0g                  participation rate, percent
mrate           float  %7.0g                  401k plan match rate
totpart         float  %7.0g                  total 401k participants
totelg          float  %7.0g                  total eligible for 401k plan
age             byte   %7.0g                  age of 401k plan
totemp          float  %7.0g                  total number of firm employees
sole            byte   %7.0g                  = 1 if 401k is firm's sole plan
ltotemp         float  %9.0g                  log of totemp
-----------------------------------------------------------------------------------------------------------------
Sorted by:  

. sum prate mrate

    Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
       prate |      1534    87.36291    16.71654          3        100
       mrate |      1534    .7315124    .7795393        .01       4.91

其实您这种情况经常发生,
主要是在读档时发生了问题,
建议在读取资料时,尽量打开原始资料看看【一些ASC||档可用notpad去看】
【Wooldridge的书现在都有提供stata专用的dta档案】

最后附上401K.dat档案以供参考
附件列表

401K.rar

大小:21.81 KB

 马上下载

本附件包括:

  • 401K.DTA

二维码

扫码加我 拉你入群

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

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

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群