statastandard-error

Is using the cluster(clustvar) option the same as using vce(cluster clustvar)?


I would like to understand what the cluster option in Stata is doing, preferably directly from official Stata documentation.

For example: reg outcome predictor, cluster(clustvar)

The documentation I am finding uses the notation reg outcome predictor, vce(cluster clustvar), and I'm unsure if these are synonymous. https://www.stata.com/manuals13/xtvce_options.pdf

I also don't have access to Stata software, so I cannot try the models myself.

I have tried to look up cluster() on Google and Bing, but I am not finding a clear documentation of cluster().


Solution

  • This is not documented explicitly in the changelog help whatsnew9to10 (as referenced by @NickCox in the comments), quoting from the document:

    All estimation commands that allowed options robust and cluster() now allow
    option vce(vcetype). ...
    
    In Stata 10, option vce() is extended to encompass the robust (and optionally
    clustered) variance calculation. ...
    
    ... where you previously typed
    
    . estimation-command ..., robust cluster(clustervar)
    
    with or without the robust, you are now to type
    
    . estimation-command ..., vce(cluster clustervar)
    
    You can still type the old syntax, but it is undocumented.  The new syntax
    emphasizes that the robust and cluster calculation affects standard errors,
    not coefficients.  See [R] vce_option.
    

    So running reg y x, cluster(z) is equivalent to running reg y x, vce(cluster z).

    One disadvantage of cluster(z) notation is that it permits only one-way clustering (one variable), while the other notation allows multi-way clustering, e.g. vce(cluster z1 z2 ...).