Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Bias in a zero truncated poisson


From   Maarten buis <[email protected]>
To   [email protected]
Subject   Re: st: Bias in a zero truncated poisson
Date   Mon, 1 Nov 2010 10:28:55 +0000 (GMT)

--- On Sun, 31/10/10, Laurie Molina wrote:
> Aren't ztp estimates unbiased estimates?

If you run the simulation below you'll see that -ztp- does 
seem to be unbiased. To run it you'll need Ian White's -simsum-
and my -hangroot-, both can be obtained from SSC, type in 
Stata: -ssc install simsum- and -ssc install hangroot-.

*---------------- begin example -----------------
program drop _all
program define sim, rclass
	drop _all
	set obs 500
	gen x = rnormal()
	gen y = rpoisson(exp(-1+2*x))
	ztp y x if y > 0
	return scalar b = _b[x]
	return scalar se = _se[x]
	test x = 2
	return scalar p = r(p)
end

set seed 12345
simulate b=r(b) se=r(se) p=r(p), reps(5000) : sim 

simsum b, se(se) true(2) mcse
hangroot p, dist(uniform) par(0 1) susp notheor ci
*------------------- end example -----------------------

Hope this helps,
Maarten

--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany

http://www.maartenbuis.nl
--------------------------


      

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index