'create a workfile wfcreate u 10000 'set the seed rndseed 12345 'generate simulated data series !alpha = 0 !beta1 = 1.5 series x1 = @runif(0,1) series e = @rnorm '@rchisq(1) 'paper seems to be using chi-squared distribution series y = @exp(!alpha+!beta1*log(x1)+e) x1 = @recode(x1<0.1,0,x1) series lx1 = @recode(x1>0,log(x1),x1) 'comparison of the best practice with the proposed solution equation eqols.ls(cov=hac) log(y) c lx1 x1=0 equation eqglm.glm(family=poisson,cov=hac) y c lx1 x1=0 equation eqgmm.gmm(instwgt=hac, gmmiter=1) log(y+exp(c(2)*lx1+c(3)*(x1=0)))-(c(2)*lx1+c(3)*(x1=0))-c(1) @ lx1 x1=0