/* ** maxlik8.e - A bootstrapped Poisson Model ** ** This run compares the heteroskedastic-consistent standard errors ** with bootstrapped estimates, for a Poisson regression model. ** This example also illustrates the use of MAXLIK with a user-supplied ** gradient procedure. */ library maxlik; #include maxlik.ext; maxset; proc lpsn(b,z); local m; m = z[.,2:4]*b; retp(z[.,1].*m-exp(m)); endp; proc lgd(b,z); retp((z[.,1]-exp(z[.,2:4]*b)).*z[.,2:4]); endp; x0 = { .5, .5, .5 }; _max_GradProc = &lgd; output file = maxlik8.out reset; __title = "heteroskedastic-consistent standard errors"; _max_Options = { hetcon }; call maxprt(maxlik("psn",0,&lpsn,x0)); maxset; rndseed 4564567; __output = 10; __title = "bootstrapped standard errors"; _max_BootFname = "mboot8"; call maxprt(maxboot("psn",0,&lpsn,x0)); printdos "\n CMLBoot has created the GAUSS data file `mboot8'\n"; printdos " containing the bootstrapped coefficients. You may\n"; printdos " want to delete this file after the program has been run\n\n"; output off;