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: Wanted: simulated data with cluster structure
From
Bert Jung <[email protected]>
To
[email protected]
Subject
Re: st: Wanted: simulated data with cluster structure
Date
Wed, 11 May 2011 08:04:43 -0400
Thanks Stas... -expand-, of course...
Bert
On Tue, May 10, 2011 at 10:48 PM, Stas Kolenikov <[email protected]> wrote:
> On Tue, May 10, 2011 at 9:31 PM, Bert Jung <[email protected]> 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)
>
> --
> Stas Kolenikov, also found at http://stas.kolenikov.name
> Small print: I use this email account for mailing lists only.
>
> *
> * 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/