stata里的ivreg2 help中说, cluster()括号中可以放入两个变量,也就是可以控制两个聚类,可是我自己做论文时,cluster里放入两个变量, 一个是所在城市,另一个是所在行业,cluster(city industrytype),执行命令后总是出现cluster(): too many variables specified r(103),怎么回事?谢谢!附:stata Help的原文如下:
cluster(varname1 varname2) provides 2-way cluster-robust SEs and statistics as proposed by Cameron, Gelbach and Miller (2006) and Thompson (2009). "Two-way cluster-robust" means the SEs and statistics are robust to arbitrary within-group correlation in two distinct non-nested categories defined by varname1 and varname2. A typical application would be panel data where one
"category" is the panel and the other "category" is time; the resulting SEs are robust to arbitrary within-panel autocorrelation (clustering on panel id) and to arbitrary contemporaneous cross-panel correlation (clustering on time). There is no point in using 2-way cluster-robust SEs if the categories are nested, because the resulting SEs are equivalent to clustering on the larger category. varname1 and varname2 do not have to uniquely identify observations. The order of varname1 and varname2 does not matter for the results, but processing may be faster if the category with the larger number of categories (typically the panel dimension) is listed first.