clear all *path global DATA ="C:\WORK\SHARE\DATA - rel 7.1.0" tempfile zakladni set more off *-------------------------------- merge zakladni modul (vek, yrbirth) -------------------------------------------------------- *zakladni modul - na to abych dostala vek respondenta use "${DATA}\sharew7_rel7-1-0_ALL_datasets_stata\sharew7_rel7-0-0_cv_r.dta", clear *****presny vek jednotlivce z roku a mesice narozeni a interview (modul cv_r obsahuje nepresny vek - pravdepodobne zaokrouhleni nahoru) gen vek_presny=. replace vek_presny=(int_year+(int_month/12)) - (yrbirth+(mobirth/12)) if int_year>2000 & int_year<2020 & yrbirth>1880 & yrbirth<=int_year & int_month>=1 & int_month<=12 & mobirth>=1 & mobirth<=12 replace vek_presny=round(vek_presny, 0.01) *****vek zaokrouhleny na cele roky dolu gen vek=floor(vek_presny) replace age_int=. if age_int<0 keep mergeid vek_presny vek yrbirth age_int sort mergeid save `zakladni' use "${DATA}\sharew7_rel7-1-0_ALL_datasets_stata\sharew7_rel7-0-0_re.dta", clear sort mergeid merge m:m mergeid using `zakladni' tab _merge keep if _merge==3 *------------------------------- REGIONS -------------------------------------------------- *South - Italy, Spain, Greece, Portugal, Cyprus gen region=1 if country==15 | country==16 | country==19 | country==33 | country==53 *West - Austria, Germany, France, Switzerland, Belgium, Luxembourg, Malta replace region=2 if country==11 | country==12 | country==17 | country==20 | country==23 | country==31 | country==59 *North - Sweden, Denmark, Estonia, Finland replace region=3 if country==13 | country==18 | country==35 | country==55 *East - Czech, Poland, Hungary, Slovenia, Lithuania, Latvia, Slovakia replace region=4 if country==28 | country==29 | country==32 | country==34 | country==48 | country==57 | country==63 *South East - Croatia, Bulgaria, Romania replace region=5 if country==47 | country==51 | country==61 label define region 1 "South" 2 "West" 3 "North" 4 "East" 5 "SouthEast", replace label values region region labellist region *Yes - Czech, Poland, Hungary, Slovenia, Lithuania, Latvia, Slovakia (East countries) - without Croatia, Bulgaria, Romania (in 1990s still in war conditions) gen post_communist=1 if country==28 | country==29 | country==32 | country==34 | country==48 | country==57 | country==63 *No - West countries: Austria, Germany, France, Switzerland, Belgium, Luxembourg, Malta replace post_communist=0 if country==11 | country==12 | country==17 | country==20 | country==23 | country==31 | country==59 /* 11 Austria 12 Germany 13 Sweden 14 Netherlands 15 Spain 16 Italy 17 France 18 Denmark 19 Greece 20 Switzerland 23 Belgium 25 Israel 28 Czech Republic 29 Poland 30 Ireland 31 Luxembourg 32 Hungary 33 Portugal 34 Slovenia 35 Estonia 47 Croatia 48 Lithuania 51 Bulgaria 53 Cyprus 55 Finland 57 Latvia 59 Malta 61 Romania 63 Slovakia */ *------------------------------------------------------------------------------------------------------------------------------- *uprava dat - year started first job replace re011_1=re002_ if re011_1==-1 & re006_==1 & re002_!=-1 & re002_!=-2 & re002_!=. replace re011_1=re002_ if re011_1==-2 & re006_==1 & re002_!=-1 & re002_!=-2 & re002_!=. ******TEACHER *dle isco - urcit ty, kteri jsou ucitelmi (ISCO 23 - Teaching Professionals) gen teacher=0 forvalues i = 1(1)20 { gen teacher_`i'=1 if re012isco_`i'==2310 | re012isco_`i'==2320 | re012isco_`i'==2330 | re012isco_`i'==2341 | re012isco_`i'==2342 | re012isco_`i'==2351 | re012isco_`i'==2352 | re012isco_`i'==2353 | re012isco_`i'==2354 | re012isco_`i'==2355 | re012isco_`i'==2356 | re012isco_`i'==2359 replace teacher_`i'=0 if re012isco_`i'!=. & teacher_`i'!=1 replace teacher=1 if teacher_`i'==1 } ******TEACHER TURNOVER *gen teacher turnover (0 if no turnover, 1 if turnover, . if not teacher) gen teacher_turnover=(teacher_1==1 & teacher_2==0) gen teacher_turnover_2=(teacher_2==0 & teacher_1==1) replace teacher_turnover_2=. if teacher==0 forvalues i = 3(1)20 { local n=`i'-1 gen teacher_turnover_`i'=(teacher_`i'==0 & teacher_`n'==1 & teacher_turnover!=1) replace teacher_turnover_`i'=. if teacher==0 replace teacher_turnover=1 if teacher_`i'==0 & teacher_`n'==1 } replace teacher_turnover=. if teacher==0 ******POSITIVE TEACHER TURNOVER *there are 18% of teachers that didnt started as teachers (positive change) and 18% of teachers switchers gen positive_turnover=(teacher_1==0 & teacher_2==1) forvalues i = 3(1)20 { local n=`i'-1 replace positive_turnover=1 if teacher_`i'==1 & teacher_`n'==0 } replace positive_turnover=. if teacher==0 gen switcher=(teacher_turnover==1 & positive_turnover==1) replace switcher=. if teacher==0 *----------------------------------- DURATION + JOB after turnover + WAGE diff ----------------------------------- gen year_turnover=. *po kolikatem zamestnani se rozhodl pro odchod ze skolstvi gen njob_turnover=. *duration (in years) of the last job before turnover gen duration_job_turn = . *isco after turnover gen isco_after_turnover=. *job industry after turnover gen industry_after_turnover=. *reasons after turnover gen reasons_after_turnover=. *gap after turnover gen gap_after_turnover=. *done in gap after turnover (if responded that 'had a gap of 6 months or more before starting new job') gen done_after_turnover=. *wage before turnover (first monthly wage in job) gen wage_before=. *currency of wage before turnover gen curr_wage_before=. *wage after turnover (first monthly wage in job) gen wage_after=. *currency of wage after turnover gen curr_wage_after=. forvalues i = 1(1)15 { local n=`i'+1 replace year_turnover=re011_`n' if teacher_turnover_`n'==1 replace njob_turnover=`i' if teacher_turnover_`n'==1 replace duration_job_turn=re011_`n'-re011_`i' if teacher_turnover_`n'==1 replace isco_after_turnover=re012isco_`n' if teacher_turnover_`n'==1 replace industry_after_turnover=re014_`n' if teacher_turnover_`n'==1 replace reasons_after_turnover=re031_`i' if teacher_turnover_`n'==1 replace gap_after_turnover=re032_`i' if teacher_turnover_`n'==1 replace done_after_turnover=re033_`i' if teacher_turnover_`n'==1 replace wage_before=re021_`i' if teacher_turnover_`n'==1 replace curr_wage_before=re022_`i' if teacher_turnover_`n'==1 replace wage_after=re021_`n' if teacher_turnover_`n'==1 replace curr_wage_after=re022_`n' if teacher_turnover_`n'==1 display `n' } *years between the start of the first job and teacher turnover gen turnover_work_time=year_turnover-re011_1 if teacher_turnover==1 *age at the turnover gen age_turnover=year_turnover-yrbirth if teacher_turnover==1 *upravy promennych replace year_turnover=. if year_turnover<0 replace duration_job_turn=. if duration_job_turn<0 | duration_job_turn>100 replace turnover_work_time=. if turnover_work_time<0 | turnover_work_time>100 replace age_turnover=. if age_turnover<0 replace industry_after_turnover=. if industry_after_turnover<0 *----------------------------------------------------------------------------------------------- *---------------------- descriptive statistics ----------------------------- *----------------------------------------------------------------------------------------------- ****COUNTRIES *table - number of observations, % of teachers in the sample, % of turnovers btw. teachers table country, c(n teacher sum teacher mean teacher sum teacher_turnover mean teacher_turnover) format(%12.3f) cell(20) row * ---------------------------------- desc statistics DURATION COUNTRIES -------------------------------------------------------- *year of turnover hist year_turnover *the number of jobs before turnover - only for those who started as teachers (i.e. without positive switchers) tab njob_turnover if teacher_1==1 *duration (in years) of the last job before turnover hist duration_job_turn tab duration_job_turn if njob_turnover==1 *years between the start of the first job and teacher turnover hist turnover_work_time if teacher_1==1 tab turnover_work_time if teacher_1==1 *vek, ve kterym odesli ze skolstvi hist age_turnover tab age_turnover *---------------------------------- desc statitics JOB after turnover COUNTRIES ------------------------------------------------- ******industry tab industry_after_turnover gen industry_after=1 if industry_after_turnover==1 | industry_after_turnover==2 | industry_after_turnover==4 | industry_after_turnover==5 //manufacturing replace industry_after=2 if industry_after_turnover==3 //manufacturing replace industry_after=3 if industry_after_turnover==6 | industry_after_turnover==7 | industry_after_turnover==8 | industry_after_turnover==9 | industry_after_turnover==10 //services - wholesale, retail, hotels, rest., transport, real estate replace industry_after=4 if industry_after_turnover==11 //public administration replace industry_after=5 if industry_after_turnover==12 //education replace industry_after=6 if industry_after_turnover==13 //health and social work replace industry_after=7 if industry_after_turnover==14 //other label define industry_after 1 "Physical labor" 2 "Manufacturing" 3 "Services" /// 4 "Public administration" 5 "Education" 6 "Health and social work" 7 "Other", replace label values industry_after industry_after labellist industry_after tab industry_after ****ISCO *ISCO - 2 digit tostring isco_after_turnover, gen(isco_after) gen isco_after_2=substr( isco_after, 1,2) destring isco_after_2, replace tab isco_after_2 if isco_after_2!=-7 & isco_after_2!=-2 & isco_after_2!=-1 *ISCO - 1 digit gen isco_after_1=substr( isco_after, 1,1) replace isco_after_1="." if isco_after_1=="-" destring isco_after_1, replace tab isco_after_1 drop isco_after gen isco_after=1 if isco_after_1==1 //managers replace isco_after=2 if isco_after_2==26 //Legal, social and cultural professionals replace isco_after=3 if isco_after_1==2 & isco_after_2!=26 //other professionals replace isco_after=4 if isco_after_1==3 //Technicians and associate professionals replace isco_after=5 if isco_after_1==4 //Clerical support workers replace isco_after=6 if isco_after_1==5 //Service and sales workers replace isco_after=7 if isco_after_1==6 | isco_after_1==7 | isco_after_1==8 | isco_after_1==9 //other label define isco_after 1 "Managers" 2 "Legal, social and cultural prof." 3 "Other professionals" /// 4 "Technicians and associate professionals" 5 "Clerical support workers" 6 "Service and sales workers" 7 "Other", replace label values isco_after isco_after labellist isco_after tab isco_after *reasons of turnover tab reasons_after_turnover if reasons_after_turnover>0 *gap after leaving this job tab gap_after_turnover *done in gap after turnover (if responded that 'had a gap of 6 months or more before starting new job') tab done_after_turnover