'create a workfile wfcreate u 100000 'generate series series x1 = @runif(0,1) !beta = 1 series lambda = @exp(1+!beta*x1) series y = @rpoisson(lambda) 'create a matrix to store the results matrix(1000,2) bias 'simulation loop !k=0 equation eqols for !i=0.001 to 1.001 step 0.001 eqols.ls log(y+!i) c x1 !k=!k+1 bias(!k,1) = !i bias(!k,2) = 100*(@abs((c(2)-!beta)/!beta)) statusline !k of 1000 next 'draw the chart freeze(graph1) bias.xyline