583 views

Uploaded by Fanny Sylvia C.

- Econometrics Bruce
- 02 SimpleLinearRegression2017forStudents
- Hetero Test
- Singapore Inc. Versus the Private Sector:
- 005
- Linear Regression Primer
- 11. Industry NCS
- Autocorrelation 01-07-2012
- 1_LinearRegression
- l25
- Corporate Reputation and Social Performance
- Chapter 4 Transformations and Weighting to Correct Model Inadequacies 13 March
- Verbeek Marno_A Guide to Modern Econometrics_Cap 5
- 02 V3 2016 CFA二级强化班 Quantitative Methods
- 14 21November Commands
- CS109a Lecture17 Boosting Other
- GLAUCOMA
- Patterns and Determinants of Organized Dairy Industry Growth a Panel Study
- Credit Competition Affect Small-Firm Finance.pdf
- Wang.pdf

You are on page 1of 4

observations in cluster g, N = g Ng is the total number of observations,

yig is the dependent variable, xig is a (K +1)-dimensional row vector of K

explanatory variables plus a constant, β is a (K + 1)-dimensional column

Clustering in the Linear Model vector of parameters, and εig is the error term.

Stacking observations within a cluster, we can write

yg = Xg β + εg

1 Introduction where yg is a Ng × 1 vector, Xg is a Ng × (K + 1) matrix and εg is is a

Ng × 1 vector. Stacking observations cluster by cluster, we can write

This handout extends the handout on ”The Multiple Linear Regression

model” and refers to its deﬁnitions and assumptions in section 2. It y = Xβ + ε

relaxes the homoscedasticity assumption (A5a) and allows the error terms

where y = [y1 ... yG

] is N × 1, Xg is N × (K + 1) and εg is N × 1.

to be heteroscedastic and correlated within groups or so-called clusters.

The data generation process (dgp) is fully described by the following

It shows in what situations the parameters of the linear model can be

set of assumptions:

consistently estimated by OLS and how the standard errors need to be

corrected. A1: Linearity

The canonical example (Moulton 1990) for clustering is a regression

yi = xig β + εig and E(εig ) = 0

of individual outcomes (e.g. wages) on explanatory variables of which

some are observed on a more aggregate level (e.g. employment growth A2: Independence

on the state level).

c) (Xg , yg )G

g=1 independently distributed

Clustering also arises when the sampling mechanism ﬁrst draws a ran-

dom sample of groups (e.g. schools, households, towns) and than surveys A2c means that the observations in one cluster are independent from the

all (or a random sample of) observations within that group. Stratiﬁed observations in all other clusters.

sampling, where some observations are intentionally under- or oversam- A3: Strict Exogeneity

pled asks for more sophisticated techniques.

2

a) εig |Xg ∼ N (0, σig )

c) E(εig |Xg ) = 0 (mean independent)

Consider the multiple linear regression model

d) Cov(Xg , εig ) = 0 and E(εig ) = 0 (uncorrelated)

yig = xig β + εig

Note that the error term εig is assumed unrelated to the explanatory

where observations belong to a cluster g = 1, ..., G and observations variables (Xg ) of all observations within its cluster.

are indexed by i = 1, ..., Ng within their cluster. Ng is the number of

3 Short Guides to Microeconometrics Clustering in the Linear Model 4

rank(X) = K + 1 < N

Suppose as Moulton(1986) that the error term εig consists of a cluster

A5: Error Variance speciﬁc random eﬀect αg and an individual eﬀect νig

2

c) V (εig |Xg ) = σig < ∞, for all i, g εig = αg + νig

Cov(εig , εjg |Xg ) = ρijg σig σjg < ∞, for all i = j, g

Assume that the individual error term is homoscedastic and independent

A5c means that the error terms are correlated within clusters (clustered)

across all observations

and have diﬀerent variances (heteroscedastic).

V (νig |Xg ) = σν2

A6: Variance of explanatory variables Cov(νig , νjg |Xg ) = 0, i = j

a) V (X) = E(X X) is positive deﬁnite and ﬁnite

and that the cluster speciﬁc eﬀect is homoscedastic and uncorrelated with

b) plim( N1 X X) = QXX is positive deﬁnite and ﬁnite the individual eﬀect

V (αg |Xg ) = σα2

The variance-covariance of the vector of error terms in the whole sample

is under A2 and A5 Cov(αg , νig |Xg ) = 0

The cluster speciﬁc eﬀect αg is under A3 at least uncorrelated with Xg

Ω = V (ε|X) = E(εε |X)

and can therefore be treated as a random eﬀect:

⎛ ⎞

Ω1 0 · · · 0

⎜ ⎟ Cov(αg , Xg ) = 0 .

⎜ 0 Ω2 · · · 0 ⎟

=⎜⎜ .. .. . . .. ⎟

⎟

⎝ . . . . ⎠ The resulting variance-covariance structure within each cluster g is

0 0 · · · ΩG then ⎛ ⎞

σ 2 σ 2 · · · ρσ 2

where, for example, ⎜ ⎟

⎜ ρσ 2 σ 2 · · · ρσ 2 ⎟

Ωg = V (εg |Xg ) = ⎜

⎜ .. .. ... .. ⎟

⎟

Ω1 = V (ε1 |X1 ) = E(ε1 ε1 |X1 ) ⎝ . . . ⎠

⎛ ⎞ ρσ 2 ρσ 2 · · · σ2

σ12 ρ12 σ1 σ2 · · · ρ1N1 σ1 σN1

⎜ ⎟ where σ 2 = σα2 + σν2 and ρ = σα2 /(σα2 + σν2 ). In a less restrictive version,

⎜ ρ12 σ1 σ2 σ22 · · · ρ2N1 σ2 σN1 ⎟

=⎜⎜ .. .. ... .. ⎟

⎟ σg2 and ρg are allowed to be cluster speciﬁc.

⎝ . . . ⎠

2 Note: this structure is identical to a panel data random eﬀects model

ρ1N1 σ1 σN1 ρ2N1 σ2 σN1 · · · σN 1

with many individuals g observed over few time periods i.

is the variance covariance of the error terms within cluster g = 1.

5 Short Guides to Microeconometrics Clustering in the Linear Model 6

4 Estimation with OLS where V = G−1 Q−1 ΣQ−1 can be consistently estimated as

G

The parameter β can be estimated with OLS as −1

−1

V̂ = (X X) Xg eg eg Xg (X X)

−1 g=1

β̂OLS = (X X) X y

with eg = yg − Xg β̂OLS .

The OLS estimator of β remains unbiased (under A1, A2c, A3c, A4, This so-called cluster-robust covariance matrix estimator is a gen-

A5c and A6) and normally distributed (additionally assuming A3a) in eralization of Huber(1967) and White(1980).1 It does not impose any

small samples. It is consistent and approximately normally distributed restrictions on the form of both heteroscedasticity and correlation within

(under A1, A2c, A3d, A4, A5c and A6b) in samples with a large number clusters (though we assumed independence of the error terms across clus-

of clusters. However, the OLS estimator is not eﬃcient any more. More ters). We can perform the usual z- and Wald-test for large samples using

importantly, the usual standard errors of the OLS estimator and tests the cluster-robust covariance estimator.

(t-, F -, z-, Wald-) based on them are not valid any more. Note: the cluster-robust covariance matrix is consistent when the

number of clusters G → ∞ and the number of observations per cluster

5 Estimating the Covariance of the OLS Estimator Ng is ﬁxed. In practice this requires a sample with many clusters (50 or

more) and relatively small number of observations per cluster.

The small sample covariance matrix of β̂OLS is under A3c and A5c

Bootstrapping is an alternative method to estimate a cluster-robust

−1 2

−1 covariance matrix under the same assumptions. See the handout on

V = V (β̂OLS |X) = (X X) X σ ΩX (X X)

”The Bootstrap”. Clustering is addressed in the bootstrap by randomly

and diﬀers from usual OLS where V = σ 2 (X X)−1 . Consequently, the drawing clusters g (rather than individual observations ig) and taking

usual estimator V̂ = σ̂ 2 (X X)−1 is incorrect. Usual small sample test all Ng observations for each drawn cluster. This so-called block bootstrap

procedures, such as the F - or t-Test, based on the usual estimator are preserves all within cluster correlation.

therefore not valid.

With the number of clusters G → ∞, the OLS estimator is asymp- 6 Estimation with Cluster Speciﬁc Random Eﬀects

totically normally distributed under A1, A2, A3d, A4, A5c and A6b

√ In the cluster speciﬁc random eﬀects model, the error covariance matrix

G(β̂ − β) −→ N 0, Q−1 ΣQ−1

d

Ω only depends on the two parameters ρ and σ. These two parameters

can be consistently estimated in samples with many clusters. We could

The OLS estimator is therefore approximately normally distributed in

plug these estimates into Ω to estimate the correct covariance V̂ for the

samples with a large number of clusters

OLS estimator β̂OLS .

A

β̂ ∼ N (β, V ) . 1

Note: the cluster-robust estimator is not clearly attributed to a specific author.

See e.g. http://www.stata.com/support/faqs/stat/robust_ref.html

7 Short Guides to Microeconometrics Clustering in the Linear Model 8

we can directly estimate β eﬃciently using feasible GLS (see the handout

on ”Heteroscedasticity in the Linear Model” and the handout on ”Panel Cameron, A. C. and P. K. Trivedi (2005), Microeconometrics: Methods

Data”). In practice, we can rarely rule out additional serial correlation and Applications, Cambridge University Press. Sections 24.5.

beyond the one induced by the random eﬀect. It is therefore advisable Wooldridge, J. M. (2002), Econometric Analysis of Cross Section and

to always use cluster-robust standard errors in combination with FGLS Panel Data. MIT Press. Sections 7.8 and 11.5.

estimation of the random eﬀects model.

Huber, P. J. (1967), The behavior of maximum likelihood estimates un-

der nonstandard conditions. In: Proceedings of the Fifth Berkeley

7 Implementation in Stata 10.0

Symposium on Mathematical Statistics and Probability. Berkeley, CA:

Stata reports the cluster-robust covariance estimator with the vce(cluster) University of California Press, 1, 221223.

option, e.g.2

Moulton, B. R. (1986) Random Group Eﬀects and the Precision of Re-

webuse auto7.dta gression Estimates, Journal of Econometrics, 32(3): 385-397.

regress price weight, vce(cluster manufacturer)

matrix list e(V)

Moulton, B. R. (1990) An Illustration of a Pitfall in Estimating the

Note: Stata multiplies V̂ with (N − 1)/(N − K) · G/(G − 1) to correct Eﬀects of Aggregate Variables on Micro Units, The Review of Eco-

for degrees of freedom in small samples. nomics and Statistics, 72, 334-338.

We can also estimate a heteroscedasticity robust covariance using a

White, H. (1980), A Heteroscedasticity-Consistent Covariance Matrix

nonparametric block bootstrap. For example,

Estimator and a Direct Test for Heteroscedasticity. Econometrica 48,

regress price weight, vce(bootstrap, rep(100) cluster(manufacturer))

817-838.

or

bootstrap, rep(100) cluster(manufacturer): regress price weight

FGLS. For example,

xtset manufacturer_grp

xtreg price weight, re

xtreg price weight, re vce(cluster manufacturer)

2

There are only 23 clusters in this example dataset used by the Stata manual.

This is not enough to justify using large sample approximations.

- Econometrics BruceUploaded byWendel Mirbel
- 02 SimpleLinearRegression2017forStudentsUploaded byLEWOYE BANTIE
- Hetero TestUploaded byLâm Lê Văn
- Singapore Inc. Versus the Private Sector:Uploaded bySeng Theam
- 005Uploaded byMohammed
- Linear Regression PrimerUploaded byMohar Sen
- 11. Industry NCSUploaded byFatima Sharmin
- Autocorrelation 01-07-2012Uploaded byInamullah Khan
- 1_LinearRegressionUploaded byhungbkpro90
- l25Uploaded bySabbir Pathan
- Corporate Reputation and Social PerformanceUploaded byAnna
- Chapter 4 Transformations and Weighting to Correct Model Inadequacies 13 MarchUploaded byLookey_Loke_5014
- Verbeek Marno_A Guide to Modern Econometrics_Cap 5Uploaded byTesalianow
- 02 V3 2016 CFA二级强化班 Quantitative MethodsUploaded byCarey Cai
- 14 21November CommandsUploaded byMustafaEf
- CS109a Lecture17 Boosting OtherUploaded byvikky90
- GLAUCOMAUploaded byMacarena Alvarez
- Patterns and Determinants of Organized Dairy Industry Growth a Panel StudyUploaded byshiv raj singh Rathore
- Credit Competition Affect Small-Firm Finance.pdfUploaded byThach Bunroeun
- Wang.pdfUploaded bynagatopein6
- GEE and Mixed ModelsUploaded byhubik38
- EViews Help_ Estimating Quantile Regression in EViewsUploaded byCharlesAlbanoCoutinho
- Lecture Notes Intro to Financial EconUploaded byliam
- f2 Value 2015Uploaded byChintan Vayeda
- Testing the validity of the Feldstein-Horioka puzzle for AustraliaUploaded byPhan Anh Thu
- Barraza Dissertation 2015Uploaded byPradeep Kundu
- 00-r15Uploaded byBernard Owusu
- ch04Uploaded byNaoman Ch
- final_assignment_on_quantitative_studiesUploaded bycattytome
- Ordinary Least Squares Regression and Regression DiagnosticsUploaded byssheldon_222

- Chapter 14Uploaded byFanny Sylvia C.
- Chapter 10Uploaded byFanny Sylvia C.
- ReviewChaps3-4Uploaded byFanny Sylvia C.
- Chapter 20Uploaded byFanny Sylvia C.
- Chapter 12Uploaded byFanny Sylvia C.
- SampleSizeCalcRevisitedUploaded byFanny Sylvia C.
- Non%26ParaBootUploaded byFanny Sylvia C.
- Chapter 11Uploaded byFanny Sylvia C.
- Hypo%26PowerLectureUploaded byFanny Sylvia C.
- Model- vs. design-based sampling and variance estimationUploaded byFanny Sylvia C.
- Chapter 13Uploaded byFanny Sylvia C.
- ReviewChaps1-2Uploaded byFanny Sylvia C.
- Chapter 8Uploaded byFanny Sylvia C.
- Charles TaylorUploaded byFanny Sylvia C.
- Chapter 21Uploaded byFanny Sylvia C.
- An Ova PowerUploaded byFanny Sylvia C.
- Good Article on Standard Error vs Standard DeviationUploaded byAshok Kumar Bharathidasan
- Chapter 7Uploaded byFanny Sylvia C.
- Chapter 7Uploaded byFanny Sylvia C.
- R Matrix TutorUploaded byFanny Sylvia C.
- Intro BootstrapUploaded byMichalaki Xrisoula
- Data Modeling: General Linear Model &Statistical InferenceUploaded byFanny Sylvia C.
- Chapter5p2LectureUploaded byFanny Sylvia C.
- The not so Short Introduction to LaTeXUploaded byoetiker
- Chapter 6Uploaded byFanny Sylvia C.
- Chapter 5Uploaded byFanny Sylvia C.
- Chapter 9Uploaded byFanny Sylvia C.
- Bio Math 94 CLUSTERING POPULATIONS BY MIXED LINEAR MODELSUploaded byFanny Sylvia C.
- GRM: Generalized Regression Model for Clustering Linear SequencesUploaded byFanny Sylvia C.

- 2018 CPI 2017 StatisticalAssessmentUploaded byDrakedy_Valoy
- Bartlett General principles of the method of least squares, with applications (1915).pdfUploaded byMarcelo Silvano de Camargo
- Crime Against Women: The Influencing FactorsUploaded byShobhit Bhatnagar
- Statistical tools for Biomedical ResearchUploaded bySantanu Ghorai
- Econometrics - Final ProjectUploaded byPelayo Esparza Sola
- 529Uploaded byMalcolm Christopher
- Hydrogen Sulphide by UV-Vis SpectrophotometerUploaded byZiauddeen Noor
- 55-732Uploaded byKian
- JDS Instruct for Contributors 2014Uploaded byOsman Aita
- IBM SPSS Statistics BaseUploaded byhalleyworld
- List Danh Muhthanh CopyUploaded byhlinh
- 77.pdfUploaded byChristianWiradendi
- GsmUploaded bybmartindoyle6396
- Aggregate Planning Using Transportation Method a Case Study in Cable IndustryUploaded byWilliam Scott
- RocLab Overview Features FAQsUploaded bysercarlos
- Final ReportUploaded byAlfredo Enrique
- Kalman Filter and Surveying ApplicationsUploaded bykateborghi
- Case Regression AnalysisUploaded byvishalLala
- evidence based practice medication errorsUploaded byapi-302591810
- [1-13]Decentralized Supervision of Schools in Kigali City Issues and ChallengesUploaded byAlexander Decker
- KeyConcept SC1x SV 2Uploaded bydeushomo
- BootstrapUploaded byNhek Vibol
- How to Construct a Control Chart for Autocorrelated DataUploaded byviselle_c
- 02cSMIIC-SE Sampling Design Appendix BUploaded bybabytrix
- Artigo Anova e GlmUploaded byJoselândio C Santos
- Eco_contributed by Dr. Monica Gupta & Prof. Swati AgUploaded byManjusree Saamavedam
- Stock3e_Empirical_SM.pdfUploaded byVarin Ali
- Stat ResearchUploaded byMylady Ramos
- Deutsch Jared L 201512 PhDUploaded byWladimir Rondan
- Predicting Bank Loan Recovery Rates With Neural NetworksUploaded byDavid Townsend