[heritage_country, heritage_freedom, x1,x2,x3,x4,x5,x6,x7,x8,x9,x10]=textread('indexecofree','%q %f %f %f %f %f %f %f %f %f %f %f'); [socecon_country,gdp,lifexp]=textread('gdplife','%q %f %f'); [gdp_country,gdpgrow]=textread('gdpgrow','%q %f'); [fh_country]=textread('fh_countries2','%q'); load fh_timedata; n=size(fh_timedata,2); pr=fh_timedata(:,1:3:n); cl=fh_timedata(:,2:3:n); t=1972:2002; clf hold on dp=diff(pr')'; dc=diff(cl')'; l=size(dp,2); for i=1:size(dp,1) deltaf(i)=.5*(dp(i,l)+dp(i,l-1)*.5+dp(i,l-2)*.25+dp(i,l-3)*.125+dp(i,l-4)*.0625)+.5*(dc(i,l)+dc(i,l-1)*.5+dc(i,l-2)*.25+dc(i,l-3)*.125+dc(i,l-4)*.0625); end ll=size(pr,2); fh=.5*(pr(:,ll)+cl(:,ll)); delta=[]; gdpgrow=gdpgrow; for i=1:size(gdp_country,1) loc=find(strcmp(gdp_country(i),fh_country)); if (~isempty(loc)) r=rand*.2-.1; loc2=find(strcmp(gdp_country(i),socecon_country)); plot(log(gdp(loc2))/log(10),r+fh(loc),'.') plot([log(gdp(loc2))/log(10) log(gdp(loc2)*(1+gdpgrow(i)*.01))/log(10)],[r+fh(loc) r+fh(loc)+deltaf(loc)]) delta=[delta; (-log(gdp(loc2))+log(gdp(loc2)*(1+gdpgrow(i)*.01)))/log(10) deltaf(loc)]; gg=text(log(gdp(loc2))/log(10),r+fh(loc)-.07,gdp_country(i)); set(gg,'HorizontalAlignment','center'); set(gg,'FontSize',[6]); else gdp_country(i) end end gg=xlabel('Log GDP per capita'); set(gg,'FontSize',[20]); gg=ylabel('Freedom House Index'); set(gg,'FontSize',[20]); gg=text(2.4,.5,'Free'); set(gg,'Rotation',[90]); gg=text(2.4,7.3,'Unfree'); set(gg,'Rotation',[90]);