Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

Re: st: Wanted: simulated data with cluster structure


From   Bert Jung <bjung59@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Wanted: simulated data with cluster structure
Date   Wed, 11 May 2011 15:04:27 -0400

Thanks for the heads-up Austin.  I wonder if it would be useful to
post (here or elsewhere) simulation code for various standardized
situations?  Apart from my own need, I understand from colleagues that
there is both demand and confusion on these matters.

Bert

On Wed, May 11, 2011 at 12:06 PM, Austin Nichols
<austinnichols@gmail.com> wrote:
> Bert Jung <bjung59@gmail.com>:
> Don't forget that your X vars (if any) also must be clustered if you
> want the nonrobust SE to be incorrect on average.
>
> On Wed, May 11, 2011 at 8:04 AM, Bert Jung <bjung59@gmail.com> wrote:
>> Thanks Stas... -expand-, of course...
>> Bert
>>
>> On Tue, May 10, 2011 at 10:48 PM, Stas Kolenikov <skolenik@gmail.com> wrote:
>>> On Tue, May 10, 2011 at 9:31 PM, Bert Jung <bjung59@gmail.com> wrote:
>>>> I need a simulated dataset with clustered data to test a user-written
>>>> bootstrap routine.  The only important feature is that the cluster
>>>> structure should lead to visibly biased standard errors in -regress-
>>>> and that a -regress, cluster()- should return the correct standard
>>>> error.
>>>
>>> Oh come on.
>>>
>>> set obs 20
>>> gen u = rnormal()
>>> gen cl = _n
>>> expand 20
>>> gen e = 0.2*rnormal()
>>> gen y = u+e
>>> reg y
>>> reg y, cl(cl)
>>>
>>> --
>
> *
> *   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/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index