全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
33170 18
2012-03-29
本人需要用讲所有的观测数据划分为5组,每一组需要是从同一个 行业 and 年份 中具有相同ROA的公司,请问是否应该用pctile 或者xtile ?具体要怎样操作,感谢!
二维码

扫码加我 拉你入群

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

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

全部回复
2012-3-30 14:00:49
无人回应,自己给自己顶一下~
二维码

扫码加我 拉你入群

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

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

2012-3-30 17:17:28
pctile creates a new variable containing the percentiles of exp, where the expression exp is typically just another variable.

xtile creates a new variable that categorizes exp by its quantiles.  If the cutpoints(varname) option is
specified, it categorizes exp using the values of varname as category cutpoints.  For example, varname might contain percentiles of another variable, generated by pctile.
二维码

扫码加我 拉你入群

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

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

2012-3-30 21:35:25
dxystata 发表于 2012-3-30 17:17
pctile creates a new variable containing the percentiles of exp, where the expression exp is typical ...
Thanks for your sharing~
请问版主,关于我的问题,要执行怎样的stata命令呢?谢谢啦~
二维码

扫码加我 拉你入群

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

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

2012-3-30 23:22:56
lvchan521 发表于 2012-3-30 21:35
Thanks for your sharing~
请问版主,关于我的问题,要执行怎样的stata命令呢?谢谢啦~
直接用cond的命令就可以实现分组吧
例如,我想把相同性别和教育程度分出来一组,则用
gen x=cond(sex==1&edu==1, 1, 0)
replace x=2 if (sex==2)& (edu==2)
replace ........直到替换完为止吧。
或者麻烦点就用gen的命令应该也可以吧。
二维码

扫码加我 拉你入群

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

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

2012-3-30 23:28:02
把数据贴出来,说明一下
二维码

扫码加我 拉你入群

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

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

点击查看更多内容…
相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

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