?=================================================================== ? Estimation of Poisson regression model by nonlinear least = ? squares. Self contained. No modification required. = ?=================================================================== READ ; NOBS=15 ; NVAR=4 ; NAMES=Y,X1,X2,X3$ 1 -0.545 0.160 0.033 0 0.892 0.125 1.476 2 1.647 0.619 -0.262 2 1.749 -1.446 0.310 2 0.362 -0.589 -1.404 0 0.531 -0.606 0.777 2 0.003 -0.800 -0.897 0 0.260 0.597 -0.640 3 1.502 -0.309 0.112 0 0.613 0.273 -0.845 0 -1.028 -0.307 -1.170 2 0.155 -0.262 -0.534 1 -1.795 -2.051 -0.398 0 -1.007 1.974 0.189 1 0.596 -0.493 -1.369 NAMELIST ; PD = One,X1,X2,X3 $ ? We compute the linear regression twice, with Regr and with NLSQ SAMPLE ; 1-15 $ REGRESS ; lhs = y ; rhs = PD $ NLSQ ; lhs = Y ; start = 0,0,0,0 ; labels = b1,b2,b3,b4 ; fcn = dot[PD] $ ? The nonlinear regression is based on E[Y³X] = exp(b'x) NLSQ ; lhs = y ; start = b ; labels = þ1,þ2,þ3,þ4 ; fcn = exp(dot[PD]) $