clear /* demo_gmm.do: Sample program to run spatial GMM with a linear model.*/ infile C1 C2 dep indep1 instr1 instr2 using data_gmm.dat sum dep generate newdep = cond(dep<7.2,0,1) gen const=1 gen cutoff1=4 gen cutoff2=4 xgmlt C1 C2 cutoff1 cutoff2 newdep const indep1, xreg(2) coord(2) matrix se4 = cov_nd replace cutoff1 = 4 replace cutoff2 = 6 xgmlt C1 C2 cutoff1 cutoff2 newdep const indep1, xreg(2) coord(2) matrix se46 = cov_nd replace cutoff1 = 6 replace cutoff2 = 4 xgmlt C1 C2 cutoff1 cutoff2 newdep const indep1, xreg(2) coord(2) matrix se64 = cov_nd xgmlt C1 C2 cutoff1 cutoff2 newdep const indep1 instr2, xreg(3) coord(2)