new ,80000; #include m:\thorsten\dpd96\dpd96.fns; @--------------------------- SPECIFY GAUSS OPTIONS ---------------------------@ @ Set ver=1 when using GAUSS386 @ ver=1; @ Set sys=1 to exit to DOS @ sys=0; @ Set bat=1 to use in batch mode @ bat=1; @ Set pseud=1 to use pseudo-inverses @ pseud=1; @ in computing two-step results @ @------------------------- SET UP FOR BATCH OPERATION ------------------------@ @ The following set up will only be used when bat is set to 1 @ @ Form of model @ imod=3; @ Choice of constants @ icon=1; @ Robust covariance & two-step option @ irob=1; @ Descriptive statistics @ ides=1; @ Print covariance matrices @ icov=0; @ Save results to GAUSS matrices @ isav=0; @------------------------------ SPECIFY DATA SET -----------------------------@ @PREPARE DATA SET TO BE USED BY DPD@ infile="m:\\thorsten\\dpd96\\data"; outfile="m:\\thorsten\\dpd96\\dpdfin"; auxfile="m:\\thorsten\\dpd96\\auxfin"; minobs=3; let varlist = growth prod1 linitial gov lly trade capgrols lpi school lbmp privo btot ; let codevar=code; let yearvar=year; {numobs,numunits,numyears,inityear}=makedpd(infile,outfile,auxfile, codevar,yearvar,varlist,minobs); @ SPECIFY GAUSS DATA SET @ @ Specify main GAUSS data set @ open f1=^outfile; @ Specify auxiliary data set @ open f2=^auxfile; @ Start reading at line (f1) @ startf1=1; @ Stop reading at line (f1) @ stopf1=rowsf(f1); @ Start reading at line (f2) @ startf2=1; @ Stop reading at line (f2) @ stopf2=rowsf(f2); @------------------------------ DATA INFORMATION -----------------------------@ @ Number of companies to @ @ process in each read @ ncomp=100; @ Data column for year @ yearcol=rows(varlist)+2; @ First year of data @ year1=inityear; @ Number of years in data set @ nyears=numyears; @ Data column for industry @ indcol=1; @ Number of industry classes @ indmax=9; @ Longest lag to be constructed @ lag=1; @------------ DATA TRANSFORMATIONS AND MODEL SELECTION SUBROUTINE ------------@ goto below; model: @ The main data set is read in to a matrix called data @ @ Operations using columns of data may be performed here @ @ Function back(c,l) returns the l'th lag of the series in column c of data @ @ Function timdum(y1~y2~...~yn) returns the 0/1 dummy with value 1 for @ @ years y1 or y2 or ... or yn and 0 otherwise. Format for years is 19xx. @ @ Function inddum(i1~i2~...~in) returns the 0/1 dummy with value 1 for @ @ industries i1 or i2 or ... or in, and 0 otherwise. @ @ Variable names temp* are reserved for storing intermediate transformations @ data[.,4]=ln(data[.,4]*100); data[.,5]=ln(data[.,5]*100); data[.,6]=ln(data[.,6]*100); data[.,11]=ln(data[.,11]*100); data[.,12]=ln(data[.,12]*100); data[.,1]=data[.,1]*100; data[.,2]=data[.,2]*100; data[.,7]=data[.,7]*100; data[.,9]=ln(1+data[.,9]); @ SELECT DEPENDENT VARIABLE @ y=diflev(1,0); namey="growth"; @ SELECT REGRESSORS @ x=diflev(3,0)~diflev(9,0)~diflev(11,0) ~diflev(4,0)~diflev(6,0)~diflev(8,0)~diflev(10,0) ; namex="initial"~"school"~ "privo"~"gov"~"trade"~"pi"~"bmp" ; @ SELECT INSTRUMENTS @ zd=gmm(3,1,1)~gmm(9,1,1)~ gmm(11,2,2)~gmm(4,2,2)~gmm(6,2,2) ~gmm(8,2,2)~gmm(10,2,2); zl=gmmlevd(3,0)~gmmlevd(9,0)~ gmmlevd(11,1)~gmmlevd(4,1)~gmmlevd(6,1) ~gmmlevd(8,1)~gmmlevd(10,1); z=combine(zd,zl); namez="onelag" ; @~"english"~"french"~"scand";@ return; below: @---------------- USER-DEFINED WALD TEST OF JOINT SIGNIFICANCE ---------------@ @ Set waldtest=1 for this option @ waldtest=0; @ Select columns of x to be tested @ testcols=2; @-------------------------- SPECIFY FILE FOR OUTPUT --------------------------@ output file=m:\thorsten\dpd96\inv.out reset; @ Note that "on" will append and "reset" will overwrite @ @*****************************************************************************@ @ @ @ AFTER SELECTING THE MODEL THIS PROGRAM CAN BE @ @ RUN DIRECTLY FROM THE GAUSS EDITOR BY HITTING F2 @ @ @ @*****************************************************************************@ #include m:\thorsten\dpd96\dpd96m.prg; end; @------------------------------- END OF PROGRAM ------------------------------@