/*************************************
 SOUTH AFRICA: March 1999
 GAUSS programs
 Regressions for IMF SP: Table 2 and 4
 Pooled data

 Effects of tariff reductions on
 TFP growth
 Empl growth
 Capital growth
 C/L growth
**************************************/

load dat[48,29] = datapool.txt;

yvartfp  = 0;  /* Set to 1 if dependent variable is TFP growth
                  Set to 0 if dependent variable is Factor growth  */

if yvartfp == 1;
output file = Table2.out reset;
else;
output file = Table4.out reset;
endif;

_output = 1;
_olsres = 1;

if yvartfp == 1;
"
TFPgr against const dum clr ex im ta tasq tch tchsq
----------------------------------------------------------";
x = dat[.,3 1 22 4 8 9 12 17 13 18];
__altnam = "Dum9498"|"CLR"|"Exp"|"Imp"|"Tariff"|"Tsq"|"Tariffch"|
"Tchsq"|"TFPgr";
{ vnam,m,b,stb,vc,stderr,sigma,cx,rsq,resid,dwstat } =
              ols(0,x[.,1],x[.,2:cols(x)]);
{b,covb,ehat} = mygmm1(x[.,1],x[.,2:cols(x)],1,0);

"
TFPgr against const dum clr ex im tch tchsq
----------------------------------------------------------";
x = dat[.,3 1 22 4 8 9 13 18];
__altnam = "Dum9498"|"CLR"|"Exp"|"Imp"|"Tariffch"|"Tchsq"|"TFPgr";
{ vnam,m,b,stb,vc,stderr,sigma,cx,rsq,resid,dwstat } =
              ols(0,x[.,1],x[.,2:cols(x)]);
{b,covb,ehat} = mygmm1(x[.,1],x[.,2:cols(x)],1,0);

"
TFPgr against const dum clr ex im tch
----------------------------------------------------------";
x = dat[.,3 1 22 4 8 9 13];
__altnam = "Dum9498"|"CLR"|"Exp"|"Imp"|"Tariffch"|"TFPgr";
{ vnam,m,b,stb,vc,stderr,sigma,cx,rsq,resid,dwstat } =
              ols(0,x[.,1],x[.,2:cols(x)]);
{b,covb,ehat} = mygmm1(x[.,1],x[.,2:cols(x)],1,0);

"
TFPgr against const dum clr tch
----------------------------------------------------------";
x = dat[.,3 1 22 13];
__altnam = "Dum9498"|"Tariffch"|"TFPgr";
{ vnam,m,b,stb,vc,stderr,sigma,cx,rsq,resid,dwstat } =
              ols(0,x[.,1],x[.,2:cols(x)]);
{b,covb,ehat} = mygmm1(x[.,1],x[.,2:cols(x)],1,0);


elseif yvartfp == 0;

"
CLRgr against const dum clr ex im tch tchsq
------------------------------------------------------";
x = dat[.,5 1 22 4 8 9 13 18];
__altnam = "Dum9498"|"CLR"|"Exp"|"Imp"|"Tariffch"|"Tchsq"|"CLRgr";
{ vnam,m,b,stb,vc,stderr,sigma,cx,rsq,resid,dwstat } =
              ols(0,x[.,1],x[.,2:cols(x)]);
{b,covb,ehat}=mygmm1(x[.,1],x[.,2:cols(x)],1,0);

"
CLRgr against const dum clr ex im tch
------------------------------------------------------";
x = dat[.,5 1 22 4 8 9 13];
__altnam = "Dum9498"|"CLR"|"Exp"|"Imp"|"Tariffch"|"CLRgr";
{ vnam,m,b,stb,vc,stderr,sigma,cx,rsq,resid,dwstat } =
              ols(0,x[.,1],x[.,2:cols(x)]);
{b,covb,ehat}=mygmm1(x[.,1],x[.,2:cols(x)],1,0);

"
Emplgr against const dum clr ex im tch tchsq
------------------------------------------------------";
x = dat[.,6 1 22 4 8 9 13 18];
__altnam = "Dum9498"|"CLR"|"Exp"|"Imp"|"Tariffch"|"Tchsq"|"Empl-gr";
{ vnam,m,b,stb,vc,stderr,sigma,cx,rsq,resid,dwstat } =
              ols(0,x[.,1],x[.,2:cols(x)]);
{b,covb,ehat}=mygmm1(x[.,1],x[.,2:cols(x)],1,0);

"
Emplgr against const dum clr ex im tch
------------------------------------------------------";
x = dat[.,6 1 22 4 8 9 13];
__altnam = "Dum9498"|"CLR"|"Exp"|"Imp"|"Tariffch"|"Empl-gr";
{ vnam,m,b,stb,vc,stderr,sigma,cx,rsq,resid,dwstat } =
              ols(0,x[.,1],x[.,2:cols(x)]);
{b,covb,ehat}=mygmm1(x[.,1],x[.,2:cols(x)],1,0);

"
CAgr against const dum clr ex im tch tchsq
------------------------------------------------------";
x = dat[.,7 1 22 4 8 9 13 18];
__altnam = "Dum9498"|"CLR"|"Exp"|"Imp"|"Tariffch"|"Tchsq"|"CA-gr";
{ vnam,m,b,stb,vc,stderr,sigma,cx,rsq,resid,dwstat } =
              ols(0,x[.,1],x[.,2:cols(x)]);
{b,covb,ehat}=mygmm1(x[.,1],x[.,2:cols(x)],1,0);

"
CAgr against const dum clr ex im tch
------------------------------------------------------";
x = dat[.,7 1 22 4 8 9 13];
__altnam = "Dum9498"|"CLR"|"Exp"|"Imp"|"Tariffch"|"CA-gr";
{ vnam,m,b,stb,vc,stderr,sigma,cx,rsq,resid,dwstat } =
              ols(0,x[.,1],x[.,2:cols(x)]);
{b,covb,ehat}=mygmm1(x[.,1],x[.,2:cols(x)],1,0);

endif;
output off;



