/* ** Regional Economic Convergence in China ** Data Analysis ** Economic Growth is defined as ln(yit/yi0) ** yit = t-th period per capita GDP in state i ** yi0 = base period per capita GDP in state i */ use gpe2; /* use y to construct economic distance */ load y[29,26]=tsinghua\chinay2.txt; @ rpcgdpm.txt; @ y=y[2:29,2:26]; @ 28 state (rows) real per capita GDP over 25 years (columns) @ format /m1 /ros 12,5; @ default format @ /* 1978-2002 (25 years) */ r=ln(y[.,25]./y[.,1])/25; /* 1978-1989 (12 years) rolling windows */ i=14; @ from base year 1978... @ do until i<1; r=(ln(y[.,i+11]./y[.,i])/12)~r; i=i-1; endo; print "Per Capita Real GDP Growth"; print " 1978-1989 1979-1990 1980-1991 1981-1992 1982-1993 1983-1994 1984-1995 1985-1996 1986-1997 1987-1998 1988-1999 1989-2000 1990-2001 1991-2002 1978-2002";; print 100*r; @ anual rate of growth in % @ /* analysis of spatial dependence for y */ load wd[29,29]=tsinghua\smatrix.txt; w1=wd[2:29,2:29]; w2=denseSubmat(sparseOnes(spwpower(spw(w1),2),28,28),0,0); w=w1+w2; @ use combined first and second orders of W @ w=w1; @ use first-order contiguity weights matrix W @ /* @ economic distance weights based on y[.,1;t] @ ym=meanc(y'); @ state means over time periods @ w3=diagrv(1/abs(ym-ym'),zeros(28,1)); w=w3.*w; @ spatial weights matrix depends on economic distance @ */ w=w./sumc(w'); @ row-standardized w @ _w_=sparseFD(w,0); @ dense matrix w -> sparse matrix _w_ @ _wr=real(eig(w)); print 1/maxc(_wr); print 1/minc(_wr); i=1; @ from base year 1978... @ do until i>15; /* @ economic distance weights based on y[.,t-11;t] @ ym=meanc(y[.,t-11:t]'); @ 28 state average y over 12 (t-11:t) years @ w3=diagrv(1/abs(ym-ym'),zeros(28,1)); w=w3.*w; @ spatial weights matrix depends on economic distance @ w=w./sumc(w'); @ row-standardized w @ _w_=sparseFD(w,0); @ dense matrix w -> sparse matrix _w_ @ _wr=real(eig(w)); */ call sptest1(r[.,i],0); i=i+1; endo; end; #include gpe\spatial.gpe;