clear all set mem 400m use "http://www.louischauvel.org/fengergeadef.dta", replace * Fempart : Female participation (% of women in total workforce) * Fertili : Total fertility rate (births per woman) * Gini : Inequality (GINI-coefficient; 2002 or latest available year) * Govhealth : Government health expenditures (% of total government expenditures) * Healthexpen : General health expenditures % GDP * Labormarkt : Spending on labor market policies (% of GDP) * Lifeexp : Life expectancy (years) * Oldageexpen : Spending on old age (% of GDP) * Soccontrib : Revenues from social contributions (% of GDP) * Socprotect : Spending on social protection (% of GDP) * Spendedu : Spending on education (% of GDP) * taxesgdp : Taxes on revenue in % of GDP * Unemployment : Unemployment rates % Lab force local fofo = " Gini Fertility9803 Govhealth Fempart Lifeexp Spendedu Unemployment Socprotection Soccontributions taxesgdp Labormarktexp Healthexpen Oldageexpen " foreach toto in `fofo' { su `toto' replace `toto'= r(mean) if `toto'==. egen z`toto'= std(`toto') *xtile z`toto'= `toto', n(4) } cluster wardslinkage z* , measure(L2) cluster gen grp = group(5) tabstat z* , by(grp) pca z* predict f1 f2 f3 tabstat f* , by(ISO) tabstat f* , by(grp) cluster dendrogram _clus_2, labels(ISO) xlabel(, angle(90) labsize(*.75)) *twoway scatter f1 f2, mlab(ISO) *su Gini Fertility9803 Govhealth Fempart Lifeexp Spendedu Unemployment Socprotection Soccontributions taxesgdp Labormarktexp Healthexpen Oldageexpen /* insheet using "C:\Documents and Settings\Pareto\Mes documents\oecdocdedepsoc.txt", clear gen ISO=co save "C:\Documents and Settings\Pareto\Mes documents\oecdocdedepsoc.dta", replace clear all use "C:\Documents and Settings\Pareto\Mes documents\fengergea.dta", clear joinby ISO using "C:\Documents and Settings\Pareto\Mes documents\oecdocdedepsoc.dta", unmatched(both) keep if _m==3 keep ISO Gini Fertility9803 Govhealth Fempart Lifeexp Spendedu Unemployment socialprotgdp socialcontrgdp taxesgdp depmarchtrav depsant depsocvieillesse rename depmarchtrav Labormarktexp rename depsant Healthexpen rename depsocvi Oldageexpen rename socialcont Soccontributions rename socialprot Socprotection save "C:\Documents and Settings\Pareto\Mes documents\site\fengergeadef.dta", replace */