Hello List,
I have a data set like the following:
custnum master state
-----------------------------
712875 712875 TX
182579 712875 CA
376083 712875 FL
716228 TN
604906 312456 IL
177414 PA
I need to redefine "state" variable for customers "custnum" such that
when there is a master customer # "master", all customers under that
master will have the same state. For example, custnum 712875, 182579, &
376083 have master 712875 and when custnum="712875" & master="712875",
the state is "TX". So, the data needs to look like:
custnum master state
-----------------------------
712875 712875 TX
182579 712875 TX
376083 712875 TX
716228 TN
604906 312456 IL
177414 PA
Can anyone please help me with this?
Thank you.
Sincerely,
Pinaki Mitra
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/