/* table1_foreign_multinational.sas June 27, 2013 */ libname public 'F:\a_data3\raw\other\patent\china\public'; run; data t; set public.multinat_patent; by app_numfix; if first.app_numfix; data t; set t; if gyear>=2005 and type='Invent'; if auto=1 and applicant_name2 in ('GENERAL MOTORS CORPORATION;ZHENGZHOU UNIVERSITY','GM GLOBAL TECHNOLOGY OPERATION CORP;ZHENGZHOU UNIVERSITY', 'GM GLOBAL TECHNOLOGY OPERATIONS INC;SHANGHAI INSTITUTE OF CERAMICS CHINESE ACA','SHANGHAI JIAOTONG UNIVERSITY;GM GLOBAL TECHNOLOGY OPERATION CORP', 'SHANGHAI UNIVERSITY;GENERAL MOTORS CORPORATION','TSINGHUA UNIVERSITY;TOYOTA MOTOR CORPORATION') then auto_academic_partner=1; *Links 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_foreign_multinational.html" style=minimal; proc tabulate data=t; class shared; var link_WIPO_or_US; table all shared, N*f=comma12.0 mean*link_WIPO_or_US*f=7.3; title 'Foreign multionationals, by whether shared or not shared with Chinese partners'; proc tabulate data=t; where first_file_China=1; class shared; var link_WIPO_or_US; table shared, N*f=comma12.0 mean*link_WIPO_or_US*f=7.3; title 'Patent first filed in China: Foreign multionationals, by whether shared or not shared with Chinese partners'; proc tabulate data=t; where first_file_China=1 and locate_china=1 and has_CNinvt=1; class shared; var link_WIPO_or_US; table shared, N*f=comma12.0 mean*link_WIPO_or_US*f=7.3; title 'first filed in China, Chinese Inventor and Location: Foreign multionationals, by whether shared or not shared with Chinese partners'; proc tabulate data=t; where auto=1 and auto_academic_partner^=1; class shared; var link_WIPO_or_US; table shared, N*f=comma12.0 mean*link_WIPO_or_US*f=7.3; title 'Automobile Industry, Foreign multionationals, by whether shared or not shared with Chinese partners'; run; ods html close; run;