/* table1_Chinese_automakers.sas June 27, 2013 This program processes the text information about company name to select out Chinese automakers, both the independents and joint venture firms. In the process, we also classify foreign multinational firms. We use company_type=1 for foreign firms comapny_type=2 for Chinese firms that operate through joint venture company_type=3 for Chinese firms that are independent. We set shared=1 if a patent is shared by a Chinese firm and a foreign firm. By definition, shared=0 for all company_type=3 firms. The final output of this program produces the count of patents, and the share going outside (WIPO or US application) for company_type=2 and shared=1 (i.e. patents that the joint venture firms share with their foreign partners) company_type=3 (i.e. patents owned by independent Chinese automakers.) */ libname public 'F:\a_data3\raw\other\patent\china\public'; run; *First process appliant_name field of patents to select out auto companies; data t; set public.CNpub_basedat; *We restrict attention to invention patents published in 2005 and later; if gyear>=2005 and type='Invent'; *Now the text processing; length company $ 30; if index(upcase(applicant_name),upcase('Volkswagen'))>0 then company='Volkswagen'; if index(upcase(applicant_name),upcase('Daimler'))>0 then company='Daimler'; if index(upcase(applicant_name),upcase('BMW'))>0 then company='BMW'; if index(upcase(applicant_name),upcase('BAVARIAN MOTOR'))>0 then company='BMW'; if index(upcase(applicant_name),'HONDA MOTOR')>0 then company='Honda'; if index(upcase(applicant_name),'HONDA AUTO')>0 then company='Honda'; if index(upcase(applicant_name),'HONDA ENGINE')>0 then company='Honda'; if index(upcase(applicant_name),upcase('Citroen'))>0 then company='PSA Peugeot Citroen'; if index(upcase(applicant_name),upcase('Peugeot'))>0 then company='PSA Peugeot Citroen'; if index(upcase(applicant_name),upcase('Suzuki Motor'))>0 then company='Suzuki'; if index(upcase(applicant_name),'TOYOTA MOTOR')>0 then company='Toyota'; if index(upcase(applicant_name),'TOYOTA AUTOCAR')>0 then company='Toyota'; if index(upcase(applicant_name),'TOYOTA SYNTH')>0 then company='Toyota'; if (index(upcase(applicant_name),'FORD MOTOR')>0 or index(upcase(applicant_name),'FORD GLOBAL')>0) then company='Ford'; if index(upcase(applicant_name),upcase('Nissan Motor'))>0 then company='Nissan'; if index(upcase(applicant_name),upcase('Nissan Auto'))>0 then company='Nissan'; if (index(upcase(applicant_name),upcase('General Motors'))>0 or index(applicant_name,' GM ')>0 or substr(applicant_name,1,3)='GM ') then company='General Motors' ; if index(applicant_name,'GM Global')>0 then company='General Motors' ; if index(upcase(applicant_name),'HYUNDAI MOTOR')>0 then company='Hyundai'; if index(upcase(applicant_name),'HYUNDAI MOBIS')>0 then company='Hyundai'; if index(upcase(applicant_name),'HYUNDAI GROUP')>0 then company='Hyundai'; if index(upcase(applicant_name),'MAZDA')>0 then company='Mazda'; if index(applicant_name,'FAW')>0 then company='FAW'; if index(upcase(applicant_name),'FIRST AUTOMOBILE WORKS')>0 then company='FAW'; if index(applicant_name,'SHANGHAI AUTO')>0 then company='SAIC'; if index(applicant_name,'SAIC')>0 then company='SAIC'; if (index(upcase(applicant_name),'DONGFENG AUTO')>0 or index(upcase(applicant_name),'DONGFENG MOTOR')>0 ) then company='Dongfeng'; if index(upcase(applicant_name),'CHERY')>0 then company='Chery'; if applicant_name='SAIC-Cherry Automobile Co.,Ltd.' then company='Chery'; if index(upcase(applicant_name),'GEELY')>0 then company='Geely'; if index(upcase(applicant_name),'BYD')>0 then company='BYD'; if index(upcase(applicant_name),'BEIJING AUTOMO')>0 then company='Beijing Auto'; if index(upcase(applicant_name),'CHONGQING CHANGAN')>0 then company='Changan'; if index(upcase(applicant_name),'CHANGAN AUTO')>0 then company='Changan'; if index(upcase(applicant_name),'ANHUI JAC AUTO')>0 then company='Anhui JAC'; if index(upcase(applicant_name),'JIANGHUAI AUTO')>0 then company='Anhui JAC'; if index(upcase(applicant_name),'BRILLIANCE')>0 then company='Brilliance'; if index(upcase(applicant_name),'JINBEI AUTO')>0 then company='Brilliance'; if index(upcase(applicant_name),'GREAT WALL MOTOR')>0 then company='Great Wall'; if index(upcase(applicant_name),'GUANGZHOU AUTOMO')>0 then company='GAC'; if index(upcase(applicant_name),'GUANGZHOU AUTO GROUP')>0 then company='GAC'; if index(applicant_name,'Guangzhou Honda')>0 then company='GAC'; if applicant_name='Honda Precision Electronic Tech Co., Ltd., Shunde Prefecture, Foshan City' then company='Honda'; if applicant_name='Zhejiang Ford Machinery Manufacturing Co., Ltd.' then company='Ford'; if company=' ' and index(upcase(applicant_name),'LIFANG')>0 then delete; *Want to keep Lifan, but there are a bunch of lifangs that don't below, clear these out; if index(upcase(applicant_name),'LIFAN')>0 then company='Lifan'; if applicant_name in ('Robert.W.Sulifan','Yunnan Lifan Junma Import and Export Co., Ltd','Yunnan Lifan Junma Vehicle Co., Ltd.') then delete; if company=' ' then delete; *Now define variable shared. Also assign cases where foreign and domestic firm own a patent to the domestic firm; shared=0; if company='General Motors' then do; if index(upcase(applicant_name),'SHANGHAI')>0 and applicant_name not in ('Shanghai University;General Motors Corporation ','GM Global Technology Operations Inc.;Shanghai Institute of Ceramics, Chinese Aca') then do; company='SAIC'; shared=1; end; if index(upcase(applicant_name),'SAIC')>0 then do; company='SAIC'; shared=1; end; end; if index(upcase(applicant_name),'DONGFENG')>0 then company='Dongfeng';*Have to be still here, so moving dongfeng honda to dongfeng; if applicant_name in (' Chana Ford Mazda Co., Ltd.;Lianwei Automotive Parts Chongqing Co., Ltd.', 'Chang''an Ford Mazda Automobile Co., Ltd.', 'Changan Ford Mazda Automobile Co., Ltd.', 'Changfan Ford Mazda Automobile Co., Ltd.','Chana Ford Mazda Co., Ltd.;Lianwei Automotive Parts Chongqing Co., Ltd. ') then do; company='Changan'; shared=1; end; if applicant_name='Zhengzhou Nissan Motor Co., Ltd. ' then do; company='Dongfeng'; shared=1; end; *In 2004, Dongfeng bought a controllinginterest. See http://de.wikipedia.org/wiki/Zhengzhou_Nissan_Automobile_Company, ; if applicant_name='Shanghai University;General Motors Corporation' then company='General Motors'; *Now look for shared patents; if applicant_name='Chongqing Changan Visteon Engine Control Systems Co., Ltd. ' then shared=1; if applicant_name='Dongfeng Honda Motor Co., Ltd.' then shared=1; if applicant_name='Dongfeng Peugeot Citroen Automobile Company Ltd.' then shared=1; if applicant_name='FAW Toyota Motor Sales Co., Ltd.' then shared=1; if applicant_name='FAW-Volkswagen Automobile Co., Ltd.' then shared=1; if applicant_name='FAW-Volkswagen Automobile Co., Ltd.;China First Automobile Works Group Corp.' then shared=1; if company='SAIC' and index(upcase(applicant_name),'GM GLOBAL')>0 then shared=1; if company='SAIC' and index(upcase(applicant_name),upcase('Shanghai GM'))>0 then shared=1; if applicant_name='SAIC-GM-WULING Automobile Co., Ltd.' then shared=1; if applicant_name='SAIC-GM-Wuling Automobile Co., Ltd. ' then shared=1; if applicant_name='Toyota Motor Corporation;Shanghai Hua Hong NEC Electronics Company Limited' then shared=1; if index(applicant_name,'Shanghai Volkswagen') then do; company='SAIC'; shared=1; end; if applicant_name in ('Wuyang-Honda Motorcycle (Guangzhou) Co., Ltd. ','Wuyang-honda Motors (Guangzhou) Co., Ltd.') then delete; *this this a shared venture with Guangzhou Motorcycle Group Corporation for motorcycles. We are throwing out motorcycles; if applicant_name='Dongfeng Honda Engine Co., Ltd.' then shared=1; if applicant_name='GM Global Technology Operation Corp.;Zhengzhou University' then shared=1; if applicant_name='GM Global Technology Operations Inc.;Shanghai Institute of Ceramics, Chinese Aca' then shared=1; if applicant_name='General Motors Corporation;Zhengzhou University' then shared=1; if applicant_name='Guangzhou Honda Automobile Co., Ltd.' then do; shared=1; company='GAC'; end; if applicant_name='Honda Precision Electronic Tech Co., Ltd., Shunde Prefecture, Foshan City' then shared=1; if applicant_name='Shanghai Branch of the Hyundai Group Co., Ltd.' then shared=1; if applicant_name='Shanghai Hyundai Mobis Automobile Parts Co., Ltd.' then shared=1; if applicant_name='Shanghai Hyundai Mobis Automotive Parts Co., Ltd.' then shared=1; if applicant_name='Shanghai Jiaotong University;GM Global Technology Operation Corp.' then shared=1; if applicant_name='Shanghai University;General Motors Corporation' then shared=1; if applicant_name='Tianjin Toyota Synthesize Co., Ltd.' then shared=1; if applicant_name='Toyota Motor Corporation;Shanghai Huahong NEC Electronics Co., Ltd.' then shared=1; if applicant_name='Tsinghua University;Toyota Motor Corporation' then shared=1; if applicant_name='Zhejiang Ford Machinery Manufacturing Co., Ltd.' then shared=1; if applicant_name='Zhengzhou Nissan Automotive Co., Ltd.' then shared=1; if applicant_name='Zhenzhou NISSAN Automobile Co., Ltd.' then shared=1; *Below are records that were included in the original selection, but are not auto companies and therefore need to be deleted; if applicant_name in ('Shenzhen BYD Middle School','Yixing Egao. Byd Textile Co., Ltd.','Zhongshan Byde Gas Appliance Co., Ltd.', 'Beijing Brilliance Biochemical Co., Ltd.','Brilliance Electrical Co., Ltd.','Brilliance Lighting Corporation','Brilliance Semiconductor Inc.', 'Tieling Brilliance Rubber & Plastic Products Co., Ltd.','Tieling Brilliance Rubber Products Co., Ltd.', 'Chengdu Xinzhu Road & Bridge Machery Co., Ltd.','Huada Pharmaceutical Machery Co., Ltd., Rui-an City','Hubei Zhifeng Numerical Control Machery Co., Ltd.', 'Kosta Cheryl Sherwood','Michery valairy','Zhangjiagang Runshan Knitting Machery Co., Ltd.','Oerlikon Textile Components GM','Medical Stone GM Co., Ltd.') then delete; *This step is now complete; run; *Create a data set assigning companies to company_type; data company_type; length company $30; input company $ 1-16 company_type 21; cards; BMW 1 PSA Peugeot Citroen 1 Daimler 1 Ford 1 General Motors 1 Honda 1 Hyundai 1 Mazda 1 Nissan 1 Suzuki 1 Toyota 1 Volkswagen 1 Beijing Auto 2 Brilliance 2 Changan 2 Dongfeng 2 FAW 2 SAIC 2 GAC 2 Anhui JAC 3 BYD 3 Chery 3 Geely 3 Great Wall 3 Lifan 3 ; *Merge company_type into the data set; proc sort data=t; by company; proc sort data=company_type; by company; *Next classify patents foreign firms own with an academic institution; data t; merge t(in=in1) company_type; by company; if in1; if applicant_name in ('General Motors Corporation;Zhengzhou University','Tsinghua University;Toyota Motor Corporation','Tsinghua University;Toyota Motor Corporation', 'GM Global Technology Operations Inc.;Shanghai Institute of Ceramics, Chinese Aca','Shanghai University;General Motors Corporation', 'GM Global Technology Operation Corp.;Zhengzhou University','Shanghai Jiaotong University;GM Global Technology Operation Corp.') then academic=1; else academic=0; proc sort data=t; by app_numfix; *Next for the Chinese independent automaker BYD we select only the autopatents (it also makes batteries. We use two definitions. (1) we look for cases where the title of the patent includes the word "VEHICLE," "AUTOM", etc (see code below). (2) We take the autopatents overall and select the top 15 3-digit IPC codes among the auto firms. If any of the IPC codes listed on a given patent are in this set, we include the patent In summary a BYD patent is included if it satisfied either criteria (1) or (2). ; data t; merge t(in=in1) public.BYD_auto_patents(in=in2); by app_numfix; if in1; BYD_intop15=in2; if company='BYD' then do; if index(upcase(title),'VEHICLE')>0 or index(upcase(title),'AUTOM')>0 or index(upcase(title),'BRAKING')>0 or index(upcase(title),'MOTOR')>0 or index(upcase(title),'STEERING')>0 or index(upcase(title),'ENGINE')>0 or index(upcase(title),'WHEEL')>0 then BYD_car_def1=1; else BYD_car_def1=0; BYD_car_def2=BYD_intop15; if BYD_car_def1=0 and BYD_car_def2=0 then delete; end; *Link to WIPOapp and USapp; data link_WIPOapp; set public.link_WIPOapp_forpri_CNpub_forpri public.link_WIPOapp_forpri_CNpub_appnum; keep app_numfix ; data link_USapp; set public.link_USapp_forpri_CNpub_forpri public.link_USapp_appnum_CNpub_forpri public.link_USapp_forpri_CNpub_appnum; keep app_numfix ; proc sort data=link_WIPOapp nodup; by app_numfix; proc sort data=link_USapp nodup; by app_numfix; data t; merge t(in=in1) link_WIPOapp(in=in2) link_USapp(in=in3); by app_numfix; if in1; link_WIPOapp=in2; link_USapp=in3; link_WIPO_or_US= link_WIPOapp or link_USapp; ods html file="F:\a_data3\raw\other\patent\china\public\table1_Chinese_automakers.html" style=minimal; proc tabulate data=t; where company_type=2 and shared=0 ; var link_WIPO_or_US; table N*f=comma12.0 mean*link_WIPO_or_US*f=7.3; title 'Chinese Firms that have Joint Venture, Patents not shared with JV partner'; proc tabulate data=t; where company_type=3 ; var link_WIPO_or_US; table N*f=comma12.0 mean*link_WIPO_or_US*f=7.3; title 'Independent'; run; ods html close; run;