I have the following types of panel data:
The actual data is huge, so ask questions to reduce the workload as much as possible.
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input float(id var1 target1 target2) 1 . 4 4 1 4 . 4 1 4 . 4 1 . . . 2 . 8 8 2 . . 8 2 8 . 8 2 . . . end
It doesn't matter whether target1 or target2.
The way I thought about it is as follows in the code
Code:
by id: replace var1[1] = max(var1)
thanks!
0 Response to by id: replace var1[1] = max(var1), error "weights not allowed"
Post a Comment