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]

st: bootstrap with clustered data


From   "Litovitz, Aviva" <[email protected]>
To   "'[email protected]'" <[email protected]>
Subject   st: bootstrap with clustered data
Date   Thu, 30 Jan 2014 19:51:42 +0000

Statalist,

I am using the -bootstrap- command with clustered data in Stata 10 and I want to make sure I understand the role of -idcluster()-.

As a test of the -bootstrap- command, I am using an example I found in the archives (http://www.stata.com/statalist/archive/2006-11/msg00025.html):

	. webuse nlswork
	. bootstrap, seed(1234) cluster(idcode) idcluster(newid) : xtreg ln_w grade age*, i(newid) fe

If I understand correctly, -cluster(idcode)- sets the cluster variable and -idcluster(newid)- generates a new value for "newid" each time a cluster is sampled by the bootstrap.  Yet when I look at "newid" values after the bootstrap is complete, each cluster is numbered consecutively, as if there were no changes to "newid" during the bootstrap process.  Because "idcode" has some missing values, "newid" does not generally match "idcode".

Why do the values of "newid" not change in the dataset?

Thanks for any help!
Aviva



__________________________________________________________________________

This email message is for the sole use of the intended recipient(s) and
may contain confidential information. Any unauthorized review, use,
disclosure or distribution is prohibited. If you are not the intended
recipient, please contact the sender by reply email and destroy all copies
of the original message.


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


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