看完R给的example,自己做了一下,效果很差啊。请教大家,希望有代码步骤,万分感谢!
数据模样的话,大概如下:
id | year | asset | inventory | cash | dividend | debt | …… | ||
1 | company1 | 2016 | 100 | 50 | 15 | 1 | 100 | ||
2 | company1 | 2015 | 90 | N/A | 16 | N/A | 120 | ||
3 | company1 | 2014 | N/A | 40 | 18 | 2 | N/A | ||
4 | company2 | 2016 | N/A | 40 | N/A | 1 | 80 | ||
5 | company2 | 2015 | 90 | 60 | 15 | N/A | 90 | ||
6 | company2 | 2014 | 80 | N/A | 13 | 1 | N/A | ||
…… | …… | …… | |||||||