Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Problem Using Bootstrapping with Ordered Logit 'gweight not allowed'


From   [email protected] (Jeff Pitblado, StataCorp LP)
To   [email protected]
Subject   Re: st: Problem Using Bootstrapping with Ordered Logit 'gweight not allowed'
Date   Tue, 20 May 2008 08:42:01 -0500

Rodwan M Abouharb <[email protected]> is using the -cluster()- and
-vce(bootstrap)- options with -ologit- and is getting an error message stating
"repeated time values within panel":

> One final question. When trying to run the equation below STATA won't let me
> cluster by country 'cluster (ccode)' when bootstrapping. I have checked the
> integrity of the data-set and there are no repeated values. Is there some
> way to cluster by country?

> ologit tort ... , cluster (ccode) vce(boot)
> (running ologit on estimation sample)
> 
> Bootstrap replications (50)
> ----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
> repeated time values within panel
> the most likely cause for this error is misspecifying the cluster(), idcluster(), or group() option
> r(451);

Rodwan's dataset has been -tsset- with a panel variable.  When called with the
-cluster()- option, -bootstrap- attempts to make sure that the integrity of
the -tsset-ings are preserved within each bootstrap sample.  Since -bootstrap-
samples clusters with replacement, Rodwan will need to specify some extra
-bootstrap- options in order to accomplish this.

If 'ccode' is the panel variable, then Rodwan needs to use -bootstrap-s
-idcluster()- option.  For example,

	. gen bootccode = ccode
	. ologit tort ..., vce(bootstrap, cluster(bootccode) idcluster(ccode))

If 'ccode' is not the panel variable, then Rodwan will need to verify that the
panel variable is nested within 'ccode' and use -bootstrap-s -group()- and
-idcluster()- options.  If we assume the panel variable is named
'panelid' then,

	. gen bootccode = ccode
	. ologit tort ..., vce(bootstrap, cluster(bootccode) idcluster(ccode) group(panelid))

--Jeff
[email protected]
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index