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 on April 23, and its replacement, 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   Stas Kolenikov <>
Subject   Re: st: Wanted: simulated data with cluster structure
Date   Tue, 10 May 2011 21:48:24 -0500

On Tue, May 10, 2011 at 9:31 PM, Bert Jung <> 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
Small print: I use this email account for mailing lists only.

*   For searches and help try:

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