Questions tagged [clustered-standard-errors]

Clustered standard errors represent the version of the general sandwich variance estimator that correct for (potential) grouping of the observations, e.g., repeated measurements clustered within an individual, or individuals clustered within a hierarchy level (geographical region, educational institution, etc.).

Filter by
Sorted by
Tagged with
0 votes
0 answers
6 views

Difference in clustering standard errors of coeftest and sum

Suppose I have a panel data and would like to look at time fixed effects, i.e. effects constant across "state" but varying over time. My understanding was always, that the estimated ...
user avatar
  • 363
0 votes
0 answers
5 views

R: Panel Data Clustered Standard Errors

Hi I have a panel regression and like to proof the robustness of my model. I estimated a fixed effects model with double clustered SEs. I estimated: an OLS - pooled model Fixed effects model Index: ...
user avatar
0 votes
1 answer
35 views

geeglm: Does as.factor() not work with corstr=fixed?

(See "Edits" at the bottom for partial resolution.) I am interested in generating point estimates for each cluster in my data using geeglm.  However, when I use as.factor() over the ...
user avatar
0 votes
0 answers
11 views

How to correctly estimate the ratio different of lower grain unit metric in Cluster randomized experiment?

I work on Education tech products that teachers/students would use in their learning journey. When we run experiment to test hypothesis of a feature, we need to do cluster randomization (cluster = ...
user avatar
2 votes
1 answer
50 views

What happens statistically, if you create more observations by measuring more aspects of the same observational unit

Let's say that I want to measure the effect of a treatment on the performance of a firm. However my sample is very small. Let's say 10 firms. It is not possible to observe more firms. All these firms ...
user avatar
  • 239
0 votes
0 answers
29 views

Heteroskedasticity in OLS which best: clustered SE or robust SE?

I am trying to estimate the effect of a change in minimum wage regulation with no control group. I computed a propensity score for the probability of being affected by the change in MW before the new ...
user avatar
  • 1
0 votes
1 answer
23 views

Should we always use clustered standard errors in panel data with only two time points, in a multilevel logistic regression?

This is the situation: I have a binary outcome at two timepoints (T1 and T2); I'm using a random-effect logistic regression (I mean: just the random intercept, no random slopes) to estimate subject-...
user avatar
0 votes
0 answers
12 views

can I cluster standard errors within a multilevel model?

I recognise this is similar to this but I couldn't understand the answer to the question and hence am asking again. Is it possible to use both cluster standard errors and multilevel models together ...
user avatar
  • 1
0 votes
0 answers
18 views

Is there a formula expressing the relationship between standard deviation, standard deviation of cluster effect and standard deviation within cluster?

Suppose I have data on child test scores of children from different schools. Children are the unit of observation and the schools are clusters. The standard deviation of the test score variable is 1.5....
user avatar
  • 13
0 votes
0 answers
219 views

Different standard errors in Stata and R for instrumental variables (ivreg)

Working with instrumental variables (IV), I noticed differences between reported standard errors in Stata (e.g., using ivreg2) and R (e.g., using AER:ivreg2). In R I found ways to replicate Stata's ...
user avatar
  • 317
0 votes
0 answers
23 views

Which standard errors?

I'm working on a project with panel data and decided to use the fixed effect model, because the hausmann test p-value < 0,05. No I wonder ho do I know, which standard errors should I use? There are ...
user avatar
0 votes
0 answers
20 views

How do I get cluster-robust standard errors for average predictions?

Let's say I have some clustered data that I use to train a regression model and I want to come up with cluster-robust standard errors for the average of a set of predictions of that model. How should ...
user avatar
0 votes
1 answer
46 views

Difference in Difference and clustering errors

I have audience data for weekly TV news broadcasts from 50 different regions. So each broadcast (around 250 in total) has 50 different audience figures. My data contains two years (year1 and year2). ...
user avatar
  • 11
0 votes
0 answers
45 views

Manual Tobit Clustered Covariance Matrix Estimation (vcovCL package R)

Dear Stack Exchange users, I estimated the following general (pooled) Tobit model using R: $y_{i,t}^{*} = a + x_{i,t} \beta +\varepsilon_{i,t}, \hspace{1cm} t = 1, ..., T$ where $y_{i,t} = y^{*}_{i,t}$...
user avatar
0 votes
0 answers
16 views

Weighted clustered standard errors

I am thinking about a weighted clustered standard error with heteroskedasticity. The estimate can be calculated as follows: \begin{equation} \begin{split} \hat{\beta} &= \left(\sum_g X_g'W_gX_g\...
user avatar
  • 33
4 votes
2 answers
134 views

Is the Likelihood Ratio test using cluster robust standard errors fixable by Bootstrap (or someting else)?

There is a common agreement about the invalidity of using likelihood ratio tests when computing Maximum Likelihood Estimates (MLE) using clustered corrected standard errors. The main argument is that ...
user avatar
  • 239
1 vote
1 answer
313 views

Country fixed effects and clustered robust standard errors for logistic regression

I'm wondering if in the same analysis I can use countries as fixed effect and as a cluster for the robust standard errors. Background: I'm running a multivariate logistic regression with the ...
user avatar
0 votes
0 answers
21 views

Generating Simulations from an OLS model with Correlated Errors (Clustered Errors)

Suppose that I have an OLS model of existing data that looks like this: $$ Y_{i} = \beta_{0}+\beta_{1}X_{1}+\beta_{1}X_{2}+GroupFixedEffects + \epsilon_{...} $$ In addition, suppose I know that errors ...
user avatar
  • 419
1 vote
0 answers
24 views

At what level should I cluster my standard errors and why?

I have a yearly panel data in which each observation is a pair of monitoring stations (stations measuring water quality in rivers) one located upstream and the other downstream, each station in the ...
user avatar
  • 13
0 votes
0 answers
35 views

Comparing Predicted Outcomes with Correlated Errors

I'm using OLS to predict a worker's performance on tasks. I need to use the fitted model to compare the predicted performance of two arbitrary people. I need to calculate the distribution of 1's ...
user avatar
  • 419
1 vote
0 answers
26 views

Cox PH model on 3 groups of same subjects but under varying conditions to see how it affects the survival - should I use clustering?

There's a group of subjects. They experience events depending on (defined by) certain conditions. I was asked by a researcher to perform a sensitivity analysis on 3 different ways to define the ...
user avatar
0 votes
0 answers
5 views

Clustered Poisson Regression

Observational Unit – I have set up multiple grids where within each grid (3x3), there are 3 different kinds of cells labeled 0, 1, and 2 identically laid out across grids. This is an observational ...
user avatar
0 votes
0 answers
191 views

choosing between xtpoisson and xtnbreg

I have a panel data set of which the dv is a count variable(number of protests)and I am choosing between xtpoisson and xtnbreg models; since my dv is over dispersion, my professor suggested me using ...
user avatar
  • 11
0 votes
0 answers
181 views

Difference between coeftest output: 'twoways' and 'individual' + time dummies

Cross-posted on Stack Overflow: https://stackoverflow.com/questions/68925694/difference-between-coeftest-output-twoways-and-individual-time-dummies I am currently working with panel data and I want to ...
user avatar
0 votes
0 answers
17 views

Testing for multicollinearity: use same specification as main model and clustered standard errors or not

When I am trying to check multiple panel data for multicollinearity by regressing one independent variable on another, should I use exactly the same specification as the main model or is an OLS ...
user avatar
  • 1
0 votes
2 answers
316 views

Estimating robust variance without cluster id in survival model

I built a survival model with coxph. I have a large dataset (1 000 000 instances) and the global model is not proportional. It cannot be improved by introducing time-dependent coefficients or ...
user avatar
  • 59
0 votes
1 answer
26 views

Account for two levels of robust standard errors in school data

I am relatively new to Statistics and R, so please forgive my naive question. I have clustered school data and would like to employ matching followed by a regression. In the paper I read ("...
user avatar
  • 3
0 votes
0 answers
19 views

Do you have to simulate clustered data from a multivariate normal?

I've read a number of posts (e.g. this one and this one) in which the author simulates clustered data (some agents $n$ are allocated across clusters $c$, with errors correlated within clusters but not ...
user avatar
  • 329
0 votes
0 answers
33 views

simulating data to estimate clustered standard errors

I've been thinking about simulating data to understand how clustered standard errors work. I thought it would be quite complicated, but then I stumbled on this World Bank blog post in which the author ...
user avatar
  • 329
0 votes
1 answer
193 views

Fixed effects model with dummy variables [closed]

I have to set up a regression analysis of panel data with a dummy variable (1 or 0) and fixed effects (for example time). Could someone help me how to do this in R? For now, I have set the dataset as ...
user avatar
  • 3
0 votes
0 answers
60 views

Clustering standard errors for difference in difference

I am running a difference in difference to examine the effect of a merger on petrol prices. I am looking to see whether the prices of company A have increased due to a merger with company B. Local ...
user avatar
0 votes
0 answers
52 views

Do GEE estimator properties (e.g. bias) change depending on the correlation structure?

A logistic regression estimated using a generalized estimating equation with a clustering variable and an independent correlation structure produces the same parameter estimates as an MLE logistic ...
user avatar
  • 1,946
0 votes
0 answers
40 views

Whether we need to cluster by country with staggered laws implementation?

When trying to find a way of avoiding using clustering, I saw that Abadie, 2017 have a great paper mentioned when we should cluster, summarized by McKenzie here. I used the paper of Dasgupta,2019 to ...
user avatar
1 vote
0 answers
20 views

What do "random sample" and "particular population" mean in clustering?

Yesterday, from a suggestion of @Dimitriy V. Masterov here, I saw from the given link about one of the reason we can avoid clustering is You want to say something about the association between ...
user avatar
1 vote
0 answers
85 views

When we can ignore clustering?

I think it is a practical headache rising when doing empirical research. I am examining the impact of anticollusion laws on firms' asset growth as Dasgupsta, 2019 uses the genralized Difference-in-...
user avatar
0 votes
0 answers
47 views

What does "autocorrelation/heteroscedasticity of the errors" mean?

When learning clustering error, from this discussion In general, you should look to cluster-adjust standard errors at the level in which you believe there exists autocorrelation/heteroscedasticity of ...
user avatar
0 votes
0 answers
18 views

Is there any simple description about cluster?

I saw the single cluster and multi-way cluster quite a bit in some finance papers (cluster for standard error). I am asking for some simple explanation about what is cluster and why we need to do ...
user avatar
1 vote
0 answers
86 views

When and why we should do single cluster in a specific layer?

From reading this discussion, there is one sentence Standard errors should be clustered at the city level, i.e. the level of aggregation at which the treatment occurs In Dasgupta, 2019's paper, the ...
user avatar
0 votes
0 answers
18 views

What arguments can be used for/against clustering standard errors and/or estimating coefficients using the fixed effects model?

I'm writing a thesis based by using the following papers as a starting point: https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3051151 https://www.sciencedirect.com/science/article/abs/pii/...
user avatar
  • 1
1 vote
1 answer
78 views

Clustering SE at 2 levels [closed]

I saw some papers that cluster standard errors at two levels (let's say firm and year) and I found R and STATA packages that can do it. But what is the idea behind clustering at two levels? And how ...
user avatar
0 votes
1 answer
59 views

clustered standard errors

In order to use clustered standard errors, I want to make sure that the residuals in each cluster are coming from the same distribution (and thus, we expect correlation), thus clustering is needed. Is ...
user avatar
  • 27
0 votes
0 answers
44 views

How to test whether I need to cluster standard errors?

I am working with panel data (flights per month of several airlines). I suppose that I need to cluster standard errors since OLS errors are not valid. Is there a way to test whether I indeed need to ...
user avatar
  • 27
0 votes
1 answer
175 views

Cluster-robust standard errors after vglm

I have estimated an ordered logistic regression with the vglm function of the VGAM package in R. Here is a minimalistic example of what I did: ...
user avatar
  • 109
1 vote
1 answer
249 views

Is it useful to implement clustered SE in the probit-type models?

For my research, I am implementing a two-stage Heckman procedure. I am working with panel data, so I was wondering if it is common and actually needed to use clustered standard errors for the first ...
user avatar
  • 27
2 votes
0 answers
77 views

What are the types of error correlation?

In many fundamental regression models errors are assumed Independent Identically Distributed. One of violations of this assumption is when the errors are somehow correlated. From what I know it may ...
user avatar
  • 1,666
0 votes
0 answers
71 views

Outlier Robust Regression with Clustered Standard Errors

I want to do a regression analysis with a dataset that consists of multiple subgroups so I have to use cluster robust standart errors. However, the dataset also has some extreme outliers and I want to ...
user avatar
  • 35
0 votes
1 answer
29 views

Why not accounting for a factor unrelated to treatment makes p-values too conservative?

I would like to know if a treatment works, but different subjects are measured across different sites. The site is unrelated to treatment, but it is related to the response (see the figure). If I put ...
user avatar
  • 6,126
1 vote
0 answers
18 views

Clustering standard errors at individual and/or organisation level with fixed effects

So, I have a relatively large panel dataset (26,000 observations) with data on speech by individuals belonging to political parties. The data is grouped by individual-week (i.e. an observation for ...
user avatar
  • 11
0 votes
1 answer
54 views

How to operationalize stratified, cluster survey sample “standard of the mean” in Excel

I have a question on the analysis of complex survey design. Basically, I am trying to replicate the SAS Surveymeans procedure in Excel in order to understand how to operationalize the equations to ...
user avatar
1 vote
1 answer
69 views

Decision between vcovPC and vcovPL (sandwich)

I want to do a linear probability model with clustered errors. The data also has a panel structure. In the R package “sandwich,” there are two functions: vcovPC() ...
user avatar
  • 23