Skip to main content

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
20 views

Compute marginal means and effect sizes with a fixed effect linear model with repeated measures

I am trying to better understand the relationship between linear models and ANOVA by doing it a bit more manually. To do this: I create a toy dataset, with two categorical variables, which I consider ...
Charly Marie's user avatar
2 votes
1 answer
39 views

Standard error clustering with few clusters

I am trying to estimate the causal effect of police presence on crime rates using county-level crime data from 166 counties across three states. The treatment is assigned at the state level. For my ...
Schwa97's user avatar
  • 71
5 votes
1 answer
198 views

Clustered standard error - intuitive explanation

I understand that the standard error is standard deviation of the sampling distribution about some parameter, for example the sample mean or a coefficient in a regression model. I also know that when ...
jbuddy_13's user avatar
  • 3,372
4 votes
2 answers
97 views

Random effect models: Understanding within, between and contextual effect

In my quest to better understand, and more effectively apply, random/fixed effects and clustered standard errors, I am struggeling with the terms "within", "between" and "...
Always_learning_new_things's user avatar
0 votes
0 answers
24 views

Granular regression with repeating dependent variable within group

I am estimating a standard OLS regression model where the unit of observation is inventor-firm-year level. The dependent variable I am interested in is patent count (a measure of inventor productivity)...
kurofune's user avatar
0 votes
0 answers
10 views

Behavior of clustered SEs for cross-level interaction with a 0 cell in fixest

I am using fixest in R for fixed effects logistic regression with clustered SEs. I am not able to share my data but hope I can explain the question well. I have 11 clusters with between 29 and 493 ...
dianishhh's user avatar
3 votes
1 answer
101 views

Multi-level models and random effects: Still confused

I know that there are many posts concerning explanations of multi-level models, random effects, fixed effects and so on. But after having read through them, and after watching this youtube series by ...
Always_learning_new_things's user avatar
0 votes
0 answers
15 views

Using GEE models without clustered data

I am studying a set of longitudinal data with an N-of-1 approach. This means studying each patient in the data separately. I know there is correlation in my response variable and I am looking to use ...
chris202's user avatar
0 votes
0 answers
24 views

When using jackknife to calculate cluster-robust standard errors, is centering at the full-sample estimator superior vs the mean of pseudovalues?

Basing on the paper here: https://users.ssc.wisc.edu/~bhansen/papers/tcauchy.html both estimators suffer from the risk of downward bias. The paper defines the estimator of variance centering at the ...
Federico Tedeschi's user avatar
3 votes
1 answer
29 views

How can I tell if a clutser-randomised crossover trial has made a unit of analysis error?

I am studying the following paper: https://jamanetwork.com/journals/jama/fullarticle/2698491 This is a cluster randomised control trial with crossover. I want to ensure they have not made a unit of ...
user356816's user avatar
1 vote
1 answer
40 views

What would be the effect of assuming the wrong homoskedastic/ heteroskedastic spread of data?

If a cluster trial had homoskedastic data, but the regression model used by the authors used 'robust standard errors' intended for use with heteroskedastic data (or vice-versa), would the implications ...
user356816's user avatar
3 votes
1 answer
48 views

Does the use of "robust standard errors" in cluster randomized trials suggest heterskadistic data, implying there is high between-cluster variability?

Please bear with me. I am only recently familiar with some of these concepts. Please correct any poor assumptions. I am analysing a cluster randomized trial with crossover between intervention and ...
user356816's user avatar
0 votes
0 answers
20 views

How to model clustered data structure association when all clusters are observed at the same time?

I have data from many recipes I made that describes how different ingredients subgroups grouped in different parent categories (sweet, sour, bitter, umami ) work together to ultimately lead to scores ...
Estimate the estimators's user avatar
2 votes
1 answer
73 views

Clustered standard errors using pgmm()

I am estimating a system-GMM model using the pgmm function from the plm package in R: ...
Veronica Santana's user avatar
0 votes
0 answers
14 views

Decomposition of variance of difference in means in cluster-randomized trial

I'm learning about cluster-randomized trials and I'm interested in the variance of the difference in means estimator. Can it simply be decomposed between intra and inter cluster variance? How?
David Masip's user avatar
1 vote
1 answer
45 views

How to compute the variance for repeated measurements with clustered observations?

I have some data that looks as follows: ...
stasSajin's user avatar
2 votes
1 answer
258 views

Derivation of clustered-standard errors

I'm trying to learn about cluster-randomized trials, and I see that people use clustered-standard errors when the unit of analysis is different than the unit of treatment assignment. If not, the false ...
David Masip's user avatar
0 votes
0 answers
20 views

Design Effect in Cluster Randomised Trials

I want to understand why and how variance inflation factor is taken in account with the formula [1+(m-1)*ICC], where M= Size of clusters and ICC is the intracluster correlation. As I have deduced till ...
Angela Sarkar's user avatar
0 votes
0 answers
24 views

How to analyze within-subjects repeated measures design with more data for some participants?

I ran a within-subjects study where the study was broken into four time periods and participants were allowed to participate once in each time period. Each time they participated they were exposed to ...
tree's user avatar
  • 113
0 votes
0 answers
11 views

Questions about efficiency of estimators with longitudinal data

I'm modelling data with repeated observations; I'm reading up on options and pitfalls, and have a few questions. Coefficient estimates are still unbiased and consistent in the presence of ...
Geoff's user avatar
  • 741
1 vote
0 answers
38 views

Why are FGLS standard errors so low when estimating linear regression on panel data?

I am currently writing my master thesis an the effect of academic publication on anomaly returns. The idea is that in finance literature anomaly - factors/portfolios are proposed. After the factor is ...
CHRISS's user avatar
  • 11
0 votes
0 answers
29 views

Proof of consequences for ignoring dependence in clustered data

This may be a trivial question and apologies if it's been answered elsewhere. I'm aware that violating the GM assumption of observations being independent, such as with clustered data, can result in ...
Ben Listyg's user avatar
3 votes
2 answers
81 views

Time clusters in a randomised trial

In cluster randomised trials, some clusters are treated whereas others are not. Usually, the clusters are geographical unit, e.g. villages. However, am I right that, in principle, the clusters could ...
afreelunch's user avatar
0 votes
0 answers
1k views

Clustered standard errors, python statsmodels

I am trying to understand clustered standard errors better. I created a very simple example: there are 100 rows, first 30 are from group 0 and next 70 are from group 1. I want to compare estimating ...
Gleb's user avatar
  • 1
1 vote
1 answer
33 views

Why is standard error of clustered observations not under-estimated?

I regularly read that clustering will cause standard errors to under-estimated. So I simulated two distributions - one with clustered observations, one without. In both cases the standard error is 0....
luciano's user avatar
  • 14.5k
1 vote
0 answers
76 views

Instrument fails when I cluster standard errors

I am replicating the Bhalotra-Figueras paper on women's political agency and health (Paper Here) an IV model where $x$ is measured at the district-level and have an instrument $z$ measured at the ...
Lorien's user avatar
  • 13
22 votes
3 answers
4k views

How to fix the problem in this XKCD comic?

Slope Hypothesis Testing (Randall Munroe, xkcd) The problem with this comic is obviously that the "measurements" are not independent, violating a key assumption for computing valid p-values....
lindelof's user avatar
  • 1,119
3 votes
0 answers
101 views

Clustered vs. GMM-based standard errors: which ones to use in asset pricing?

This question was posted on Quantitative Finance Stack Exchange a while ago. While it was received positively there and generated a reasonable amount of views, no answers have been posted. Thus I am ...
Richard Hardy's user avatar
1 vote
0 answers
126 views

How to conduct a power analysis for a linear regression with clustered standard errors?

I would like to conduct a posthoc power analysis for a linear regression model to see the power of my analysis given the effect size I am finding. However, due to the clustering of standard errors, I ...
Chonasi's user avatar
  • 11
2 votes
0 answers
113 views

Appropriate fixed effect and clustered standard error to use in a diff-in-diff set up

My question is about using fixed effects and clustered standard errors in a difference-in-difference setup. I am trying to estimate the causal effect of a policy change on a measure of employment over ...
Kris's user avatar
  • 21
1 vote
1 answer
48 views

How to estimate cluster robust errors in the presence of fixed effects for groups within cross sectional data?

I am dealing with cross sectional data that has groups within the observations. For example, the dataset of an online firm registered in one country that allows multiple banks from different countries ...
Laiy's user avatar
  • 245
0 votes
0 answers
142 views

Repeated patients in a matched case control study - how to cluster the standard errors

I'm doing a matched case control study to assess the impact of a disease on healthcare usage. I'm using observational data, and I have a panel of patients with many years observations each. In the ...
Tom Wagstaff's user avatar
2 votes
0 answers
63 views

Cluster robust standard error

$$\bf{y}=\bf{X\beta}+\bf{\epsilon}$$ In asymptotic setting, assume: (a) linearity (b) $\{y_i,\bf{x}_i\}$ ergodic stationarity (c) weak exogeneity $E(\bf{x}_i\epsilon_i)=0$ (d) Rank condition $E(\bf{x}...
jasmine's user avatar
  • 367
0 votes
1 answer
396 views

Cluster standard errors on experiment group?

I am running a very simple experiment. There are two different experiment groups, participants are randomly assigned. They have to make a simple binary decision in the experiment. I have three control ...
user1769925's user avatar
2 votes
0 answers
194 views

Spatial Error Model vs Conley standard errors

What is the difference (pros and cons) of using an OLS with conley standard errors and a spatial error model? Is there a recommendation for when you should use one over the other? Thanks!
Green Apples's user avatar
10 votes
2 answers
2k views

When are cluster robust standard errors a valid "alternative" to mixed models?

Background If we have data with multiple measurements per subject, I understand we must model or correct for the non-independence. I believe there are several approaches to doing this. One is a mixed ...
user167591's user avatar
5 votes
1 answer
357 views

is ab test valid for concluding causal relation, when analysis unit differs from randomization unit?

In a typical A/B test, the randomization unit is user level, sometimes the analysis unit may be page/visit level, like a cluster randomization experiment. In this situation, the iid assumption doesn't ...
wei's user avatar
  • 703
1 vote
0 answers
87 views

How to test if both the mean and variance of the treatment effect is less than the control?

Statistics background I'm relatively new to experimentation and causal inference. I took up to graduate level stats in school but forget a ton after entering industry. Situation I am running an ...
kilocal's user avatar
  • 11
1 vote
1 answer
464 views

How to estimate disease prevalence using logistic regression when some people are measured several times

I have a binary variable indicating the presence or absence of a disease as well as variables for time and other covariates. SOME (not all) people are observed (tested) several times. Suppose I want ...
user167591's user avatar
2 votes
1 answer
322 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 ...
math's user avatar
  • 365
2 votes
0 answers
610 views

R: Panel Data Clustered Standard Errors

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: ...
Johannes's user avatar
1 vote
1 answer
121 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 ...
Brian M.'s user avatar
6 votes
1 answer
71 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 ...
Tom's user avatar
  • 528
2 votes
1 answer
416 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-...
Federico Tedeschi's user avatar
0 votes
1 answer
138 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 ...
jonnyf's user avatar
  • 121
0 votes
0 answers
2k 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 ...
sheß's user avatar
  • 367
0 votes
0 answers
32 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 ...
wrangjangler's user avatar
0 votes
1 answer
185 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). ...
Mike S.'s user avatar
  • 11
5 votes
2 answers
842 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 ...
TTT's user avatar
  • 229
1 vote
1 answer
3k 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 ...
Andressa TB's user avatar

1
2 3 4 5