请选择 进入手机版 | 继续访问电脑版
楼主: yujiawei38
2256 12

[数据管理求助] 求stata分组数据中不同年份持股数量最大的股东,对比每两年的最大股东是否发生变化 [推广有奖]

  • 0关注
  • 0粉丝

小学生

78%

还不是VIP/贵宾

-

威望
0
论坛币
0 个
通用积分
0
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
173 点
帖子
15
精华
0
在线时间
0 小时
注册时间
2019-4-24
最后登录
2019-5-16

yujiawei38 发表于 2019-5-15 21:45:37 来自手机 |显示全部楼层 |坛友微信交流群
相似文件 换一批

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币
如图“证券代码”以(000001,000002...)向下走,年份“year”以(2006-12-31,2007-12-31...)现要找出每个股票类型中不同年份持股比例最高的股东,并对比出是否与上年的不同,例如:“证券代码”为000001中“year”为2006-12-31中“持股比例”最大17.89是“NEWBRIDGE ASIA AIVIII, L. P.”,“year”为2007-12-31中“持股比例”最大16.7还是“NEWBRIDGE ASIA AIVIII, L. P.”,所以这两年最大股东没变,填没变(或0),之后比2007-12-31与2008-12-31的最大股东是否变化了,还是变化了,填改变(或1),楼主超级小白,谢谢大佬! image20190515214540.jpg
二维码

扫码加我 拉你入群

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

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

关键词:stata分组 Stata tata 最大的 大股东

yujiawei38 发表于 2019-5-15 21:46:51 来自手机 |显示全部楼层 |坛友微信交流群
@黄河泉

使用道具

yujiawei38 发表于 2019-5-15 21:47:16 来自手机 |显示全部楼层 |坛友微信交流群
yujiawei38 发表于 2019-5-15 21:46
@黄河泉
求黄老师解答

使用道具

yujiawei38 发表于 2019-5-15 22:19:09 来自手机 |显示全部楼层 |坛友微信交流群
yujiawei38 发表于 2019-5-15 21:45
如图“证券代码”以(000001,000002...)向下走,年份“year”以(2006-12-31,2007-12-31...)现要找出每 ...
对不起各位大佬,才发现原来数据里有持股比例的排名,持股为1的为最大股东,现在只需要对比每两年的最大股东是否有变化 image20190515221912.jpg

使用道具

yujiawei38 发表于 2019-5-15 22:20:44 来自手机 |显示全部楼层 |坛友微信交流群
yujiawei38 发表于 2019-5-15 22:19
对不起各位大佬,才发现原来数据里有持股比例的排名,持股为1的为最大股东,现在只需要对比每两年的最大股 ...
这是带排名的数据图片 image20190515222049.jpg

使用道具

黃河泉 在职认证  发表于 2019-5-16 07:58:11 |显示全部楼层 |坛友微信交流群
yujiawei38 发表于 2019-5-15 21:46
@黄河泉
你若要问程序,永远附上相关资料;若附上资料,永远用 dataex 印出资料。
1.        先 ssc install dataex (并见说明),将原始 Stata 资料中具有”代表性”的一部分资料列出,以供有意回答者实验之用,并能提供具体操作指令。
2.        请参考说明 https://bbs.pinggu.org/thread-5048204-1-1.html

使用道具

yujiawei38 发表于 2019-5-16 10:26:56 |显示全部楼层 |坛友微信交流群
黃河泉 发表于 2019-5-16 07:58
你若要问程序,永远附上相关资料;若附上资料,永远用 dataex 印出资料。
1.        先 ssc install dataex (并 ...
make        price        mpg        rep78        headroom        trunk        weight        length        turn        displacement        gear_ratio        foreign
AMC Concord        4099        22        3        2.5        11        2930        186        40        121        3.58        Domestic
AMC Pacer        4749        17        3        3.0        11        3350        173        40        258        2.53        Domestic
AMC Spirit        3799        22                3.0        12        2640        168        35        121        3.08        Domestic
Buick Century        4816        20        3        4.5        16        3250        196        40        196        2.93        Domestic
Buick Electra        7827        15        4        4.0        20        4080        222        43        350        2.41        Domestic
Buick LeSabre        5788        18        3        4.0        21        3670        218        43        231        2.73        Domestic
Buick Opel        4453        26                3.0        10        2230        170        34        304        2.87        Domestic
Buick Regal        5189        20        3        2.0        16        3280        200        42        196        2.93        Domestic
Buick Riviera        10372        16        3        3.5        17        3880        207        43        231        2.93        Domestic
Buick Skylark        4082        19        3        3.5        13        3400        200        42        231        3.08        Domestic
Cad. Deville        11385        14        3        4.0        20        4330        221        44        425        2.28        Domestic
Cad. Eldorado        14500        14        2        3.5        16        3900        204        43        350        2.19        Domestic
Cad. Seville        15906        21        3        3.0        13        4290        204        45        350        2.24        Domestic
Chev. Chevette        3299        29        3        2.5        9        2110        163        34        231        2.93        Domestic
Chev. Impala        5705        16        4        4.0        20        3690        212        43        250        2.56        Domestic
Chev. Malibu        4504        22        3        3.5        17        3180        193        31        200        2.73        Domestic
Chev. Monte Carlo        5104        22        2        2.0        16        3220        200        41        200        2.73        Domestic
Chev. Monza        3667        24        2        2.0        7        2750        179        40        151        2.73        Domestic
Chev. Nova        3955        19        3        3.5        13        3430        197        43        250        2.56        Domestic
Dodge Colt        3984        30        5        2.0        8        2120        163        35        98        3.54        Domestic
Dodge Diplomat        4010        18        2        4.0        17        3600        206        46        318        2.47        Domestic
Dodge Magnum        5886        16        2        4.0        17        3600        206        46        318        2.47        Domestic
Dodge St. Regis        6342        17        2        4.5        21        3740        220        46        225        2.94        Domestic
Ford Fiesta        4389        28        4        1.5        9        1800        147        33        98        3.15        Domestic
Ford Mustang        4187        21        3        2.0        10        2650        179        43        140        3.08        Domestic
Linc. Continental        11497        12        3        3.5        22        4840        233        51        400        2.47        Domestic
Linc. Mark V        13594        12        3        2.5        18        4720        230        48        400        2.47        Domestic
Linc. Versailles        13466        14        3        3.5        15        3830        201        41        302        2.47        Domestic
Merc. Bobcat        3829        22        4        3.0        9        2580        169        39        140        2.73        Domestic
Merc. Cougar        5379        14        4        3.5        16        4060        221        48        302        2.75        Domestic
Merc. Marquis        6165        15        3        3.5        23        3720        212        44        302        2.26        Domestic
Merc. Monarch        4516        18        3        3.0        15        3370        198        41        250        2.43        Domestic
Merc. XR-7        6303        14        4        3.0        16        4130        217        45        302        2.75        Domestic
Merc. Zephyr        3291        20        3        3.5        17        2830        195        43        140        3.08        Domestic
Olds 98        8814        21        4        4.0        20        4060        220        43        350        2.41        Domestic
Olds Cutl Supr        5172        19        3        2.0        16        3310        198        42        231        2.93        Domestic
Olds Cutlass        4733        19        3        4.5        16        3300        198        42        231        2.93        Domestic
Olds Delta 88        4890        18        4        4.0        20        3690        218        42        231        2.73        Domestic
Olds Omega        4181        19        3        4.5        14        3370        200        43        231        3.08        Domestic
Olds Starfire        4195        24        1        2.0        10        2730        180        40        151        2.73        Domestic
Olds Toronado        10371        16        3        3.5        17        4030        206        43        350        2.41        Domestic
Plym. Arrow        4647        28        3        2.0        11        3260        170        37        156        3.05        Domestic
Plym. Champ        4425        34        5        2.5        11        1800        157        37        86        2.97        Domestic
Plym. Horizon        4482        25        3        4.0        17        2200        165        36        105        3.37        Domestic
Plym. Sapporo        6486        26                1.5        8        2520        182        38        119        3.54        Domestic
Plym. Volare        4060        18        2        5.0        16        3330        201        44        225        3.23        Domestic
Pont. Catalina        5798        18        4        4.0        20        3700        214        42        231        2.73        Domestic
Pont. Firebird        4934        18        1        1.5        7        3470        198        42        231        3.08        Domestic
Pont. Grand Prix        5222        19        3        2.0        16        3210        201        45        231        2.93        Domestic
Pont. Le Mans        4723        19        3        3.5        17        3200        199        40        231        2.93        Domestic
Pont. Phoenix        4424        19                3.5        13        3420        203        43        231        3.08        Domestic
Pont. Sunbird        4172        24        2        2.0        7        2690        179        41        151        2.73        Domestic
Audi 5000        9690        17        5        3.0        15        2830        189        37        131        3.20        Foreign
Audi Fox        6295        23        3        2.5        11        2070        174        36        97        3.70        Foreign
BMW 320i        9735        25        4        2.5        12        2650        177        34        121        3.64        Foreign
Datsun 200        6229        23        4        1.5        6        2370        170        35        119        3.89        Foreign
Datsun 210        4589        35        5        2.0        8        2020        165        32        85        3.70        Foreign
Datsun 510        5079        24        4        2.5        8        2280        170        34        119        3.54        Foreign
Datsun 810        8129        21        4        2.5        8        2750        184        38        146        3.55        Foreign
Fiat Strada        4296        21        3        2.5        16        2130        161        36        105        3.37        Foreign
Honda Accord        5799        25        5        3.0        10        2240        172        36        107        3.05        Foreign
Honda Civic        4499        28        4        2.5        5        1760        149        34        91        3.30        Foreign
Mazda GLC        3995        30        4        3.5        11        1980        154        33        86        3.73        Foreign
Peugeot 604        12990        14                3.5        14        3420        192        38        163        3.58        Foreign
Renault Le Car        3895        26        3        3.0        10        1830        142        34        79        3.72        Foreign
Subaru        3798        35        5        2.5        11        2050        164        36        97        3.81        Foreign
Toyota Celica        5899        18        5        2.5        14        2410        174        36        134        3.06        Foreign
Toyota Corolla        3748        31        5        3.0        9        2200        165        35        97        3.21        Foreign
Toyota Corona        5719        18        5        2.0        11        2670        175        36        134        3.05        Foreign
VW Dasher        7140        23        4        2.5        12        2160        172        36        97        3.74        Foreign
VW Diesel        5397        41        5        3.0        15        2040        155        35        90        3.78        Foreign
VW Rabbit        4697        25        4        3.0        15        1930        155        35        89        3.78        Foreign
VW Scirocco        6850        25        4        2.0        16        1990        156        36        97        3.78        Foreign
Volvo 260        11995        17        5        2.5        14        3170        193        37        163        2.98        Foreign

使用道具

yujiawei38 发表于 2019-5-16 10:28:58 |显示全部楼层 |坛友微信交流群
黃河泉 发表于 2019-5-16 07:58
你若要问程序,永远附上相关资料;若附上资料,永远用 dataex 印出资料。
1.        先 ssc install dataex (并 ...
老师你好,我输入了那两个命令之后数据变成了这样...不知道对不对

使用道具

黃河泉 在职认证  发表于 2019-5-16 10:29:53 |显示全部楼层 |坛友微信交流群
yujiawei38 发表于 2019-5-16 10:26
make        price        mpg        rep78        headroom        trunk        weight        length        turn        displacement        gear_ratio        foreign
AMC Concor ...
这资料前后还有指令,请一并附上!

使用道具

yujiawei38 发表于 2019-5-16 10:35:14 |显示全部楼层 |坛友微信交流群
黃河泉 发表于 2019-5-16 07:58
你若要问程序,永远附上相关资料;若附上资料,永远用 dataex 印出资料。
1.        先 ssc install dataex (并 ...
stata进度3.xlsx (15.75 MB) ,老师,这是原本的excel表格,非常感谢您的回复!

使用道具

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

本版微信群
加好友,备注jltj
拉您入交流群

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-3-28 16:47