I tried to collapse the following data but it says varlist required, why?
collapse smi1 smi2 lsmi1 lsmi2 [pw==shares], by (permno date)
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input double(permno shares date smi1 smi2) float(lsmi1 lsmi2) 10001 119324 18628 -69.55078125 -1260000 -736.769 -2210000 10001 117181 18628 0 0 -51.88709 -940000 10001 16900 18628 0 0 -126.95777 -2300000 10001 6150 18628 87.21446990966797 1580000 0 0 10001 12366 18628 0 0 998.0674 5500000 10001 24315 18628 240.66776084899902 4360000 635.3408 11510000 10001 750 18628 165.04510498046875 2990000 -165.0451 -2990000 10001 19986 18628 51.33509826660156 930000 103.22218 1870000 10001 190860 18628 35.87936782836914 650000 0 0 10001 58062 18628 -160.0771942138672 -2900000 -204.2364 -3700000 10001 24315 18629 -2143.792381286621 -9550000 807.5618 14630000 10001 58062 18629 1033.946834564209 4500000 -364.3136 -6600000 10001 190860 18629 -792.1060791015625 -2800000 35.879368 650000 10001 6150 18629 -87.21446990966797 -1580000 0 0 10001 16900 18629 -750.0168380737305 -800000 0 0 10001 117181 18629 620.0230731964111 2570000 -51.88709 -940000 10001 750 18629 -1810.5282592773437 -6400000 165.0451 2990000 10001 19986 18629 -1314.4269104003906 -6900000 205.8924 3730000 10001 119324 18629 736.769063949585 2210000 -763.8166 -2700000 10001 12366 18629 818.6706085205078 2250000 906.9891 3850000 10001 117181 18630 0 0 594.0795 2100000 10001 19986 18630 -205.8923797607422 -3730000 -902.6422 560000 10001 190860 18630 0 0 -720.3474 -1500000 10001 16900 18630 126.95777130126953 2300000 -750.0168 -800000 10001 24315 18630 -24.287572860717773 -440000 -1557.0267 1080000 10001 58062 18630 -57.958980560302734 -1050000 771.7514 -250000 10001 6150 18630 0 0 -87.21447 -1580000 10001 119324 18630 69.55078125 1260000 736.769 2210000 10001 750 18630 221.34811401367187 4010000 -1645.483 -3410000 10001 12366 18630 91.07839965820313 1650000 818.6706 2250000 10001 19986 18631 0 0 -205.8924 -3730000 10001 24315 18631 -195.40457344055176 -3540000 -24.28757 -440000 10001 16900 18631 0 0 126.95777 2300000 10001 6150 18631 87.21446990966797 1580000 0 0 10001 12366 18631 0 0 91.0784 1650000 10001 750 18631 0 0 221.3481 4010000 10001 117181 18631 0 0 0 0 10001 119324 18631 -27.04752540588379 -490000 69.55078 1260000 10001 58062 18631 -160.0771942138672 -2900000 -57.95898 -1050000 10001 190860 18631 0 0 0 0 10001 117181 18632 0 0 0 0 10001 58062 18632 218.03617477416992 3950000 -160.0772 -2900000 10001 12366 18632 -91.07839965820313 -1650000 0 0 10001 190860 18632 -35.87936782836914 -650000 0 0 10001 750 18632 -193.1966094970703 -3500000 0 0 10001 6150 18632 0 0 87.21447 1580000 10001 24315 18632 -215.27620697021484 -3900000 -195.40457 -3540000 10001 16900 18632 126.95777130126953 2300000 0 0 10001 19986 18632 -154.55728149414062 -2800000 0 0 10001 119324 18632 69.55078125 1260000 -27.047525 -490000 10001 119324 18633 -27.04752540588379 -490000 69.55078 1260000 10001 117181 18633 25.943544387817383 470000 0 0 10001 16900 18633 0 0 126.95777 2300000 10001 24315 18633 49.67912673950195 900000 -215.2762 -3900000 10001 190860 18633 35.87936782836914 650000 -35.879368 -650000 10001 19986 18633 51.33509826660156 930000 -154.5573 -2800000 10001 6150 18633 -87.21446990966797 -1580000 0 0 10001 750 18633 28.151504516601563 510000 -193.1966 -3500000 10001 12366 18633 -44.15922546386719 -800000 -91.0784 -1650000 10001 58062 18633 0 0 218.0362 3950000 10001 16900 18634 126.95777130126953 2300000 0 0 10001 19986 18634 -154.55728149414062 -2800000 51.3351 930000 10001 12366 18634 -91.07839965820313 -1650000 -44.15923 -800000 10001 119324 18634 69.55078125 1260000 -27.047525 -490000 10001 58062 18634 102.11821365356445 1850000 0 0 10001 24315 18634 -176.63690948486328 -3200000 49.67913 900000 10001 190860 18634 0 0 35.879368 650000 10001 6150 18634 0 0 -87.21447 -1580000 10001 117181 18634 0 0 25.943544 470000 10001 750 18634 -193.1966094970703 -3500000 28.151505 510000 48486 157100 18630 0 0 -179.94884 -3260000 48486 114744 18630 0 0 828.6754 6020000 48486 30 18630 0 0 -875.7326 -4480000 48486 206461 18630 126.95777130126953 2300000 -750.0168 -800000 48486 735988 18630 44.71121597290039 810000 121.98987 2210000 48486 141006 18630 0 0 -74.51869 -1350000 48486 6032435 18630 68.99878692626953 1250000 678.9481 2400000 48486 93037 18630 70.10276794433594 1270000 -508.5901 -1170000 48486 134071 18630 0 0 560.7532 1290000 48486 224297 18630 69.55078125 1260000 736.769 2210000 48486 96331 18630 0 0 1007.1063 4220000 48486 340026 18630 0 0 -176.6369 -3200000 48486 2843432 18630 91.07839965820313 1650000 818.6706 2250000 48486 8832 18630 0 0 565.79004 2000000 48486 1996036 18630 0 0 -720.3474 -1500000 48486 471167 18630 0 0 -17.663689 -320000 48486 107866 18630 0 0 594.0795 2100000 48486 341814 18630 0 0 -786.4482 -2780000 48486 37259331 18630 -24.287572860717773 -440000 -1557.0267 1080000 48486 205836 18630 0 0 -704.4086 -2490000 48486 2538329 18630 221.34811401367187 4010000 -1645.483 -3410000 48486 494176 18630 0 0 -87.21447 -1580000 48486 21538876 18630 -205.8923797607422 -3730000 -902.6422 560000 48486 603629 18630 0 0 -672.0482 -3100000 48486 13728 18630 0 0 -1402.4695 -2720000 48486 78400 18630 0 0 0 0 48486 1629980 18630 0 0 -777.9614 -2750000 48486 667007 18630 80.0385971069336 1450000 185.46873 3360000 48486 2407336 18630 -57.958980560302734 -1050000 771.7514 -250000 48486 6905562 18630 0 0 0 0 48486 341814 18631 0 0 0 0 48486 96331 18631 40.295291900634766 730000 0 0 48486 37259331 18631 -195.40457344055176 -3540000 -24.28757 -440000 48486 21538876 18631 0 0 -205.8924 -3730000 48486 30 18631 -71.75873565673828 -1300000 0 0 48486 93037 18631 27.047523498535156 490000 70.10277 1270000 48486 2843432 18631 0 0 91.0784 1650000 end format %td date
0 Response to Collapse says varlist required
Post a Comment