% chow test for constancy of Pareto exponent

idx = find(year>1945) ; % take postwar obs
a = Alpha(idx,1) ;
a_bar = mean(a) ;
SSR0 = sum((a-a_bar).^2) ;

idx_after1985 = find(year>1985) ;
a2 = Alpha(idx_after1985,1) ;
a2_bar = mean(a2) ;
SSR2 = sum((a2-a2_bar).^2) ;

idx_before1985 = find((year>1945).*(year<=1985)) ;
a1 = Alpha(idx_before1985,1) ;
a1_bar = mean(a1) ;
SSR1 = sum((a1-a1_bar).^2) ;

F = (SSR0-(SSR1+SSR2))/((SSR1+SSR2)/(length(idx-2)))
cv = finv(0.95,1,length(idx-2))
