libname my 'c:\China';
run;
¡@
data d; set my.kstar;
LNGDP=log(GDP);
LNLAB=log(LAB);
LNCAP=log(CAP);
RATIO=CAP/LAB;
LNRAT=log(RATIO);
/*
LNRATSQ=LNRAT**2;
*/
GDPLAB=GDP/LAB;
LNGDPL=log(GDP/LAB);
LAGLAB=lag(LNLAB);
LAGCAP=lag(LNCAP);
LAGGDPL=lag(LNGDPL);
LAGRAT =lag(LNRAT);
LAGTREND=lag(TREND);
DLNGDPL=LNGDPL-LAGGDPL;
DLNRAT=LNRAT-LAGRAT;
DLNLAB=LNLAB-LAGLAB;
/******************************SERIAL CORRELATION*********/
/*
GDPLSTAR=LNGDPL-0.555951*LAGGDPL;
RATSTAR=LNRAT-0.555951*LAGRAT;
TRENDST=TREND-0.555951*LAGTREND;
*/
/****************************** TIFA 4
sources********************/
¡@
LAGSA=lag(SA);
LAGDL=lag(DL);
LAGFI=lag(FI);
LAGSRF=lag(SRF);
¡@
¡@
DLFISR=DL+FI+SRF;
FISRSA=FI+SRF+SA;
SRSADL=SRF+SA+DL;
SADLFI=SA+DL+FI;
LADLFISR=lag(DLFISR);
LAFISRSA=lag(FISRSA);
LASRSADL=lag(SRSADL);
LASADLFI=lag(SADLFI);
¡@
LNSADLFI=log(SADLFI);
LNDLFISR=log(DLFISR);
LNFISRSA=log(FISRSA);
LNSRSADL=log(SRSADL);
LNSA=log(SA);
LNDL=log(DL);
LNFI=log(FI);
LNSRF=log(SRF);
¡@
Y=(DLNGDPL-0.020251)/0.578033+DLNLAB;
SAL=SA/LAB;
DLL=DL/LAB;
FIL=FI/LAB;
SRL=SRF/LAB;
LNSAL=log(SAL);
LNDLL=log(DLL);
LNFIL=log(FIL);
LNSRL=log(SRL);
run;
¡@
/******************************** eq 4**************/
data source; set d;
if _n_ >= 17;
run;
pro reg data=source;
title 'regression using 1980-1998 observations';
model LNGDPL= LNSAL LNDLL LNFIL LNSRL;
model LNGDPL= LNSAL LNDLL LNFIL LNSRL TREND;
model LNGDPL= LNRAT TREND;
model LNGDPL= LNRAT;
run;
proc print data= source;
var YEAR LNGDPL CAP SA DL FI SRF LAB LNSAL LNDLL LNFIL LNSRL;
run;
¡@
¡@
/* CAP Y SADLFI DLFISR FISRSA SRSADL SA DL FI SRF;*/
¡@
¡@
/*
pro reg data=source;
model LNGDP= LNLAB LNSADLFI LNSRF;
model LNGDP= LNLAB LNDLFISR LNSA;
model LNGDP= LNLAB LNFISRSA LNDL;
model LNGDP= LNLAB LNSRSADL LNFI;
run;
*/
/*
proc sysnlin data=source;
title 'regression using 1980-1998 observations: DLFISR SA';
Y=log(DLFISR+B1*SA)-log(LADLFISR+B2*LAGSA);
ENDO Y; EXO DLFISR SA LADLFISR LAGSA;
PARMS B1 B2;
run;
proc sysnlin data=source;
title 'regression using 1980-1998 observations, FISRSA DL';
Y=log(FISRSA+B1*DL)-log(LAFISRSA+B2*LAGDL);
ENDO Y; EXO FISRSA DL LAFISRSA LAGDL;
PARMS B1 B2;
run;
proc sysnlin data=source;
title 'regression using 1980-1998 observations, SRSADL FI';
Y=log(SRSADL+B1*FI)-log(LASRSADL+B2*LAGFI);
ENDO Y; EXO SRSADL FI LASRSADL LAGFI;
PARMS B1 B2;
run;
proc sysnlin data=source;
title 'regression using 1980-1998 observations: SADLFI SRF';
Y=log(SADLFI+B1*SRF)-log(LASADLFI+B2*LAGSRF);
ENDO Y; EXO SADLFI SRF LASADLFI LAGSRF;
PARMS B1 B2;
run;
*/
/*
proc sysnlin data=source;
title 'regression using 1980-1998 observations: SADLFI SRF';
Y=A*log(SADLFI+B*SRF);
ENDO Y; EXO SADLFI SRF;
PARMS A B;
run;
proc sysnlin data=source;
title 'regression using 1980-1998 observations: DLFISR SA';
Y=A*log(DLFISR+B*SA);
ENDO Y; EXO DLFISR SA;
PARMS A B;
run;
proc sysnlin data=source;
title 'regression using 1980-1998 observations, FISRSA DL';
Y=A*log(FISRSA+B*DL);
ENDO Y; EXO FISRSA DL;
PARMS A B;
run;
proc sysnlin data=source;
title 'regression using 1980-1998 observations, SRSADL FI';
Y=A*log(SRSADL+B*FI);
ENDO Y; EXO SRSADL FI;
PARMS A B;
run;
*/
¡@
¡@
/********************************** WHOLE DATASET 1952-1998
************/
¡@
/****************************************EQUATION 3******/
/*
proc reg data=d;
title 'USE I hat: regression using 1952-1998 observations';
model DLNGDPL=DLNRAT /dw;
run;
proc print data=d;
title 'regression using 1952-1998 observations';
run;
*/
¡@
¡@
/*model GDPLSTAR=RATSTAR TRENDST/dw;
run;*/ /****************************SERIAL CORRELATION******/
¡@
/*
proc reg data=d;
title 'regression using 1952-1998 observations';
model LNGDP=LNCAP LNLAB /dw;
model LNGDP=LNCAP LNLAB TREND /dw;
model LNGDPL=LNRAT /dw;
model LNGDPL=LNRAT TREND /dw;
output out=b r=residual p=yhat /dw;
model LNGDPL=LNRAT LNRATSQ TREND /dw;
run;
*/
¡@
/*
data b; set b;
run;
proc print data=b;
title 'residual of the model LNGDPL=LNRAT TREND';
var residual;
run;
*/
/************************* 1978-1998**************************/
/*
data post; set d;
if _n_ >= 15;
run;
proc print data=post;
title 'regression using 1978-1998 observations';
run;
¡@
proc reg data=post;
title 'regression using 1978-1998 observations';
model GDPLSTAR=RATSTAR TRENDST/dw;
run;
*/
/*
model LNGDP=LNCAP LNLAB /dw;
model LNGDP=LNCAP LNLAB TREND /dw;
model LNGDPL=LNRAT /dw;
model LNGDPL=LNRAT TREND /dw;
model LNGDPL=LNRAT LNRATSQ TREND /dw;
run;
*/
¡@
/********************************** CHOW TEST ************/
/*
proc reg data=d;
title 'Chow Test:regression using 1952-1998 observations';
model LNGDPL=LNRAT TREND;
run;
¡@
¡@
¡@
data pre; set d;
if _n_ < 15;
run;
proc print data=pre;
title 'Chow Test:regression using 1952-1977 observations';
var YEAR LNGDPL LNRAT ;
run;
proc reg data=pre;
title 'Chow Test:regression using 1952-1977 observations';
model LNGDPL=LNRAT ;
run;
¡@
¡@
¡@
¡@
¡@
proc print data=post;
title 'Chow Test:regression using 1978-1998 observations';
var YEAR LNGDPL LNRAT TREND;
run;
proc reg data=post;
title 'Chow Test:regression using 1978-1998 observations';
model LNGDPL=LNRAT TREND;
run;
*/
¡@
/************** TIFA 4 SOURCES this is not used as the coeff is
out of expectation*********/
¡@
/*
data post; set d;
if _n_ >= 17;
run;
proc print data=post;
title 'regression using 1980-1998 observations';
run;
proc reg data=post;
title 'regression using 1980-1998 observations';
model LNGDP= LNLAB LNSADLFI LNSRF;
model LNGDP= LNLAB LNDLFISR LNSA;
model LNGDP= LNLAB LNFISRSA LNDL;
model LNGDP= LNLAB LNSRSADL LNFI;
run;
¡@
*/