# Re: Re: st: how to adjust standard error with -cluster- option by two dimensions?

 From sjsamuels@gmail.com To statalist@hsphsun2.harvard.edu Subject Re: Re: st: how to adjust standard error with -cluster- option by two dimensions? Date Mon, 27 Jul 2009 12:14:16 -0400

```I should have added that an answer to your second question: adding
indicator variables for "year" would be a good start to modeling the
time effect, but only a start.

-Steve

On Mon, Jul 27, 2009 at 11:58 AM, <sjsamuels@gmail.com> wrote:
> Rose, I've not tried any of these programs and I am not expert in this
> area.  However, with only five years of data, you do not have enough
> time clusters to rely on the two-way clustering methods. In fact, with
> so few year clusters, Petersen's simulations seem to show that two-way
> clustering is not necessary (see Figure 7 of his paper).  So, I
> suggest  that you cluster on company and model time in another way,
> perhaps with random coefficient models. As Petersen stresses, you must
> still test the assumption that your model is correct.
>
> In any case, I suggest that you read at least the summaries and
> conclusions of Petersen and the Cameron, Gelbach, and Miller papers.
>
> Good luck
>
>
>
>
>
> On Mon, Jul 27, 2009 at 11:03 AM, <gjhxmu@sina.com> wrote:
>> Steve, thanks a lot.I got probit2.ado in the website you posted.
>>
>> However, I had two doubts.
>>
>> Firstly, My sample is pooled cross-section data.
>> I estimate standard error clustered by company and year. Should I
>> still take year dummies varialbes as independent variables? In fact,
>> when I include year dummies as independent variables, the standard error
>> for them are missing. why?
>>
>> Probit with 2D clustered SEs                           Number of obs =    4396
>>                                                       F(  9,     .) =       .
>>                                                       Prob > F      =       .
>> Number of clusters (code) =    1285                    R-squared     =       .
>> Number of clusters (year) =       5                    Root MSE      =       .
>> ------------------------------------------------------------------------------
>>       |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
>> -------------+----------------------------------------------------------------
>>    x1 |   .1120743    .024432     4.59   0.000     .0641884    .1599602
>>    x2 |  -.4514519   .2984397    -1.51   0.130    -1.036383    .1334791
>>    x3 |  -.8063046   .2314595    -3.48   0.000    -1.259957   -.3526524
>>    x4 |  -.3627517   .1717722    -2.11   0.035     -.699419   -.0260843
>>    x5 |  -.7701916   .2277355    -3.38   0.001    -1.216545   -.3238382
>>  year1 |  -.0380545          .        .       .            .           .
>>  year2 |  -.0613474          .        .       .            .           .
>>  year3 |  -.1183585          .        .       .            .           .
>>  year4 |  -.1321975          .        .       .            .           .
>>       _cons |  -1.997594   .2141259    -9.33   0.000    -2.417273   -1.577915
>> ------------------------------------------------------------------------------
>>
>>     SE clustered by code and year
>>
>>
>> Secondly, why the equation statistics is F, not chi2? why is missing?
>>
>> Thank you for any help!
>>
>> Sincerely,
>> From Rose.
>>
>> ----- Original Message -----
>> From: sjsamuels@gmail.com
>> To: statalist@hsphsun2.harvard.edu
>> Subject: Re: st: how to adjust standard error with -cluster- option by two dimensions?
>> Date: 2009-7-27 20:19:39
>>
>> --
>> http://www.econ.ucdavis.edu/faculty/dlmiller/statafiles/#_jmp0_
>>
>> This code was used in: “Robust Inference with multi-way clustering” by
>> Cameron, Gelbach, and Miller (2006, NBER TWP 327) available at:
>> http://ideas.repec.org/p/nbr/nberte/0327.html#_jmp0_
>>
>> Other Stata programs that have adapted or extended this approach can
>> be found on the web page:
>> http://www.kellogg.northwestern.edu/faculty/petersen/htm/papers/se/se_programming.htm
>>
>> to accompany a paper:
>> http://www.kellogg.northwestern.edu/faculty/petersen/htm/papers/standarderror.htm
>>
>>

*
*   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/
```