全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
3088 2
2012-10-28
. *%%%%%%%%%%%%%%%%%%

.
. * data generation

.
. *%%%%%%%%%%%%%%%%%%

.
.
.
. gen soe_em_sh = soe_em/total_em
soe_em_sh already defined
r(110);

.
. gen va_pw = total_va/total_em
va_pw already defined
r(110);

.
.
.
. tab year, gen(yeardum)

       year |      Freq.     Percent        Cum.
------------+-----------------------------------
       2001 |         37       16.67       16.67
       2002 |         37       16.67       33.33
       2003 |         37       16.67       50.00
       2005 |         37       16.67       66.67
       2006 |         37       16.67       83.33
       2007 |         37       16.67      100.00
------------+-----------------------------------
      Total |        222      100.00
yeardum1 already defined
r(110);

.
.
.
. tsset id year
       panel variable:  id (strongly balanced)
        time variable:  year, 2001 to 2007, but with gaps
                delta:  1 unit

.
.
.
. gen va_growth = (va_pw-L.va_pw)/L.va_pw*100
va_growth already defined
r(110);

.
.
.
. gen nonsoe_em_sh = 100 - soe_em_sh*100
nonsoe_em_sh already defined
r(110);

.
. gen nonsoe_em_sh_diff = nonsoe_em_sh - L.nonsoe_em_sh
nonsoe_em_sh_diff already defined
r(110);


. gen em_dpe_sh = em_dpe/(em_dpe+em_soe)*100
em_dpe_sh already defined
r(110);

.
.
.
. gen gdp_pc_growth = (gdp_pc_real - L.gdp_pc_real)/L.gdp_pc_real*100
gdp_pc_growth already defined
r(110);

.
.
.
. gen surplus = netexport/gdpexp*100
surplus already defined
r(110);

.
.
.
. tab year, gen(yeardum)

       year |      Freq.     Percent        Cum.
------------+-----------------------------------
       1997 |         31        9.09        9.09
       1998 |         31        9.09       18.18
       1999 |         31        9.09       27.27
       2000 |         31        9.09       36.36
       2001 |         31        9.09       45.45
       2002 |         31        9.09       54.55
       2003 |         31        9.09       63.64
       2004 |         31        9.09       72.73
       2005 |         31        9.09       81.82
       2006 |         31        9.09       90.91
       2007 |         31        9.09      100.00
------------+-----------------------------------
      Total |        341      100.00
yeardum1 already defined
r(110);

.
.
.
. gen em_dpe_sh_diff = em_dpe_sh - L.em_dpe_sh
em_dpe_sh_diff already defined
r(110);

.
.
.
. gen gdp_pc_real_10thousand = gdp_pc_real/10000
gdp_pc_real_10thousand already defined
r(110);
二维码

扫码加我 拉你入群

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

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

全部回复
2012-10-28 20:27:42
soe_em_sh already defined

换过一个变量称就可以了。
二维码

扫码加我 拉你入群

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

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

2023-8-17 15:00:44
ywh19860616 发表于 2012-10-28 20:27
soe_em_sh already defined

换过一个变量称就可以了。
怎么换呀
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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