Hi, I am using the following data (Sample). I need to create a panel id which is uniquely identified. I have three trade groups and in every trade group, there is observation from every firm. Please have a look:
Example generated by -dataex-. To install: ssc install dataex
clear
input double gvkey long date byte group double num_trades
1004 19129 1 753
1004 19130 1 984
1004 19130 2 5
1004 19131 1 954
1004 19131 2 1
1004 19134 1 1115
1004 19135 1 1159
1004 19136 3 1
1004 19136 1 1643
1004 19136 2 6
1004 19137 1 945
end
format %d date
I am trying to group gvkey by group or date but unable to have unique ids. Your advice on this will be highly appreciated.
Thanks
Related Posts with Panel ID in Trade Groups
I2 using metaprop states "overall (I^2=0.00%, p= . )" NB: no I2 and no p-value for I2Hi. I am using metaprop to calculate prevalence of infections. The command I am using is metaprop p…
Continuous threshold model (Kink threshold model)Hey all, What's the difference between the threshold model that can divide the sample into two regi…
Compare: Logit regress with Categorical variables with Chi2 testDear all, I have problem with Logit regress. PHP Code: use https://thongke.club/data/logit.dt…
reshaping bilateral dataDear Statalist members, I have an issue to reshape the bilateral exchange rate data, could someone …
Syntax for By var: with IF statementThis is not a pressing matter as I easily found a work-around, I was just curious if anyone could te…
Subscribe to:
Post Comments (Atom)
0 Response to Panel ID in Trade Groups
Post a Comment