{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Expt1a

# Expt1a - *= Section 4.9.4 Example of Various Test...

This preview shows pages 1–3. Sign up to view the full content.

/*=================================================== Section 4.9.4. Example of Various Test Procedures. */=================================================== Read ; Nobs = 20 ; Nvar = 3 ; Names = I,Y,E\$ 1 20.5 12 2 31.5 16 3 47.7 18 4 26.2 16 5 44.0 12 6 8.28 12 7 30.8 16 8 17.2 12 9 19.9 10 10 9.96 12 11 55.8 16 12 25.2 20 13 29.0 12 14 85.5 16 15 15.1 10 16 28.5 18 17 21.4 16 18 17.7 20 19 6.42 12 20 84.9 16 Sample;1-20\$ ? ? Just change name to be consistent with text ? Create;x=e\$ ? ? Unrestricted maximum likelihood estimation. ? Maxize ; fcn = -r*log(beta+x)-log(gma(r))-y/(beta+x)+(r-1)*log(y) ; start=-5,1 ; labels=beta,r\$ /* +---------------------------------------------+ | User Defined Optimization | | Maximum Likelihood Estimates | | Dependent variable Function | | Weighting variable ONE | | Number of observations 20 | | Iterations completed 4 | | Log likelihood function -82.91605 | +---------------------------------------------+ +---------+--------------+----------------+--------+---------+----------+ |Variable | Coefficient | Standard Error |b/St.Er.|P[|Z|>z] | Mean of X| +---------+--------------+----------------+--------+---------+----------+ BETA -4.718503621 3.6568024 -1.290 .1969 R 3.150896345 1.2398481 2.541 .0110 */ ? ? Pick off parameter estimates ? Calc ; betaml=b(1);rml=b(2)\$ ? ? Compute variables that are first and second derivatives ? gb and gr are first derivatives, hbb,hrr,hbr = Hessian ? Also computes log likelihood function ? Create ; gb=-rml/(betaml+x)+y/(betaml+x)^2 ; gr=-log(betaml+x)-psi(rml)+log(y) a

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
; hbb=rml/(betaml+x)^2-2*y/(betaml+x)^3 ; hrr=-psp(rml) ; hbr=-1/(betaml+x)\$
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 4

Expt1a - *= Section 4.9.4 Example of Various Test...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online