Dear all,
I made an earlier post and Clyde showed me how to do fill in http://www.statalist.org/forums/foru...ingle-variable
My new request is to fill in by group, I did not find good information doing google search.
Data have : if you read my last post (see link above), I added a new variable psic and a new observation 8700 , now I want to fill in sic for firms with the same psic, I call it psic cohort.
gvkey if firm identifier
data want
so it fills in sic for firms sharing the same psic.
Is there a by option for fillin?
thanks,
Rochelle
I made an earlier post and Clyde showed me how to do fill in http://www.statalist.org/forums/foru...ingle-variable
My new request is to fill in by group, I did not find good information doing google search.
Data have : if you read my last post (see link above), I added a new variable psic and a new observation 8700 , now I want to fill in sic for firms with the same psic, I call it psic cohort.
gvkey if firm identifier
Code:
clear input int(gvkey psic sic) byte sale 9375 100 100 100 8596 100 115 20 8596 100 6552 12 8596 100 7374 35 8700 3200 3200 56 end
data want
Code:
clear input int(gvkey psic sic) byte sale 9375 100 100 100 9375 . 115 . 9375 . 6552 . 9375 . 7374 . 8596 100 100 . 8596 100 115 20 8596 100 6552 12 8596 100 7374 35 8700 3200 3200 56 end
Is there a by option for fillin?
thanks,
Rochelle
Comment