Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down on April 23, and its replacement, **statalist.org** is already up and running.

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

From |
"Kim, Seung Gyu" <sgkim@utk.edu> |

To |
<statalist@hsphsun2.harvard.edu> |

Subject |
RE: st: zero truncated negative binomial (ztnb) with sampling weight |

Date |
Fri, 14 May 2010 15:27:48 -0400 |

Thanks for your information. I need to read them, but what is the major difference between by weighting using "pweight" option in ZTNB vs. -svyset-. Thank you, sir. SG ztnb LHS RHS [pweight= xx] , dispersion(mean) -----Original Message----- From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Steve Samuels Sent: Friday, May 14, 2010 3:18 PM To: statalist@hsphsun2.harvard.edu Subject: Re: st: zero truncated negative binomial (ztnb) with sampling weight The form of the weighted likelihood (independent data) is given in the Stata Manual reference for -ztnb-. As you have probability weights, you probably have a complex survey design (clusters, strata). If so, you should -svyset-your data and use -svy: ztnb-. For survey data, the general survey form of likelihood estimating equations is shown in the "Variance Estimation" chapter of Stata's Survey Data Manual. -predict- following -svy: ztnb- will give two kinds of predictions ("n" and "cm") from which you can form residuals. Use the first if zero was a possible value that could not be observed for some reason; otherwise- if the data are inherently positive- use the second. You appear to want to standardize the residual in some way. I don't recognize the denominator in your residual so I cannot comment on it. I would guess, however, that the denominator appropriate for the non-truncated negative binomial will suffice for all practical purposes. Steve On Tue, May 11, 2010 at 2:45 PM, Kim, Seung Gyu <sgkim@utk.edu> wrote: > Dear all: > > I am struggling with ZTNB with sampling weight. The residuals of > "negative binomial regression" are calculated as > (y-yhat)/(1+yhat*alpha), but I could not find the residuals if it is > "truncated" and "weighted by sampling weight" at the same time. I would > appreciate if someone gives me the functional form of residuals or > loglikelihood function for ZTNB with sampling weight. > > FYI, log likelihood function of zero truncated negative binomial is > Y*ln(alpha*exp(xb)/(1+alpha*exp(xb))-ln(1+alpha*exp(xb))/alpha+ln > Gamma(y+1/alpha)-ln Gamma(y+1)-ln > Gamma(1/alpha)-ln(1-(1+alpha*exp(xb))^(-1/alpha). > Thanks. > > SG Kim > sgkim@utk.edu > > > * > * 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/ > -- Steven Samuels sjsamuels@gmail.com 18 Cantine's Island Saugerties NY 12477 USA Voice: 845-246-0774 Fax: 206-202-4783 * * 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/ * * 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/

**Follow-Ups**:**Re: st: zero truncated negative binomial (ztnb) with sampling weight***From:*Steve Samuels <sjsamuels@gmail.com>

**References**:**st: zero truncated negative binomial (ztnb) with sampling weight***From:*"Kim, Seung Gyu" <sgkim@utk.edu>

**Re: st: zero truncated negative binomial (ztnb) with sampling weight***From:*Steve Samuels <sjsamuels@gmail.com>

- Prev by Date:
**Re: st: zero truncated negative binomial (ztnb) with sampling weight** - Next by Date:
**Re: Error message: estimates post: matrix has missing values** - Previous by thread:
**Re: st: zero truncated negative binomial (ztnb) with sampling weight** - Next by thread:
**Re: st: zero truncated negative binomial (ztnb) with sampling weight** - Index(es):