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
1answer
19 views

Variance Inflation Factors for a glm with clustered standard errors

I am using the glm.cluster function in R package miceadds and I would like to calculate the variance inflation factors (VIF), much as the vif function in R package car does. If I try to use car::vif I ...
0
votes
0answers
18 views

Replicating results with multiway clustering

I am trying to replicate table 2 of Nunn and Wantchekon (2011) (the paper data is available online). It involves a linear regression with fixed effects and adjusting for two-way clustering. The code ...
2
votes
1answer
50 views

How to block bootstrap in stata with set of dummy variables as controls

I want to estimate a Multiple multivariate regression of the type $$y_1=a_1+b_1*x+c_1*\text{countrydummies}+e_1 \\ y_2=a_2+b_2*x+c_2*\text{countrydummies}+e_2 \\ ... \\ y_N=a_N+b_N*x+c_N*\text{...
0
votes
0answers
6 views

performing a multilevel logistic regression: data naturally clustered but small clusters, singletons and limited number of 2nd level clusters: help?

I am looking to perform a binomial regression calculating the reselection chances of parliamentarians in the European Parliament based on their activity levels. DV= reselection: 0/1. My data is ...
0
votes
0answers
9 views

Adjusting standard errors for *both* heteroskedasticity and clusters in MATLAB?

My data is not exactly a panel, so I can't use the Panel Data Toolbox. It is over time (years) but not for the same industries. For example I have multiple rows with same industry in one year, and ...
0
votes
0answers
11 views

How to decide SE clustering unit?

I am working with survey panel data. I believe I should be clustering standard error, but I am confused as to which would be the right dimension. Is there a way to make an informed choice (by looking ...
1
vote
1answer
43 views

Strange looking funnel plot after computing cluster robust standard errors

I fitted the following hierarchical mixed-effects meta-analytic model using rma.mv() in the metafor R package. mod<-rma.mv(yi=yi, V=vi, mods=~ region + subtype, random = ~ 1 |study/id, data = es, ...
0
votes
1answer
21 views

difference in difference fixed effect vs clustered standard error

I am trying to run a difference-in-difference regression. I have one country in the treatment group and two countries in the control group. I believe there is a need to account for fixed effects to ...
1
vote
2answers
87 views

Does it make sense to use clustered standard errors outside of a regression framework?

I am unsure about how to proceed in the following context. Here is some toy data from R: ...
2
votes
1answer
90 views

How to cluster standard errors when fitting a model using maximum likelihood estimation in R?

I am estimating several parameters using the mle() function with the L-BFGS-B method in R to data from an experiment in which participants had to make multiple choices. My goal is to obtain population ...
0
votes
0answers
19 views

Cluster Standard errors with plm at higher level than group

my model suffers from autocorrelation, thus I wanted to cluster the SEs. I have firm level, industry level and country level observations in my model. A paper that I am following clustered the Ses at ...
0
votes
0answers
38 views

How to deal with overlapping observations in a regression?

I estimate model $Y_{i,(t+1)\rightarrow (t+6)} = \alpha + \beta \cdot X_{i,(t-11)\rightarrow t} + \epsilon_{i,(t+1)\rightarrow (t+6)},$ where $i$ is a firm, and $t$ is a month. Since the dependent ...
1
vote
1answer
44 views

One sample t-test with Groups?

I wish to find the mean dollar value in my data while properly accounting for different groups. Say for example I have a set of data as follows: ...
0
votes
0answers
16 views

Multilevel versus clusteredness in the sample

does anyone can explain to me the main differences between multilevel estimations and clustering correction? I think with HLM technique we can get estimation to the random parameters (the group level ...
2
votes
1answer
95 views

How can the clustered robust standard errors be smaller than the model based ones?

I ran a GEE model and I used it to check the difference between the empirical standard errors and the model-based one. For almost the variables, the empirical standard error was greater than the OLS ...
2
votes
1answer
64 views

Replicate Stata 'variance' and 'robust' in R for mixed effects methods [closed]

I am working with a small dataset of clustered data. The experiment is on mice, testing the efficacy of a substance for neurons cells within mice, and delivery of a fatty acid substance between mice. ...
0
votes
0answers
43 views

Three-way clustered robust standard errors in R

Suppose I have the following data: ...
0
votes
1answer
11 views

multilevel modeling or clustered SE when there is only one group

I am having a hard time deciding which modeling approach I should take. I have a survey data from a random sample from New York City. I want to explore the effect of NYC's number of crime incidence (...
2
votes
0answers
24 views

Standard error clustering: Does it depend on the variable of interest?

Suppose I am interested in whether a students age affects their performance, and I run the following regression: $performance(i) = \beta_1 age(i) + \beta_2 Female(i)+\beta_3 classsize(i)+\varepsilon(...
0
votes
0answers
8 views

How fine is the finest cluster level in a sample with individual data?

When using software to estimate the variance or standard error of statistics calculated from complex survey samples with clustering and stratification, if the sample contains data on individuals, is ...
0
votes
0answers
62 views

Within Between Variance Calculation in R

I am trying to correct the Standard Errors of a OLS regression ``manually'' but I am having difficulty comparing my correction to the standard errors of a multilevel model. As an example I use the <...
2
votes
1answer
132 views

Clustered standard errors and time dummies in panel data

Assume a simple linear regression model, I have $i$ firms and $t=17$ periods $$Y_{it}=\alpha + \beta_2 T_2 + \beta_3 T_3 + \cdots + \beta_{16} T_{16} + \gamma_i + \varepsilon_{it}$$ In this case, $t=...
2
votes
0answers
69 views

Variance-covariance matrix of individual fixed-effects seems to be biased by clustering

For some reasons, I am interested in the variance-covariance matrix of the individual fixed-effects when regressing wages on personal characteristics: $Y_{i,t} = X_{i,t} \times \beta + c_i + \epsilon_{...
1
vote
0answers
21 views

Is it a problem if cluster sizes vary wildly in a cluster-randomized experiment?

Consider a cluster-randomized experiment. There are 4,000 clusters and 2,000,000 observations. The dependent variable y is dichotomous, $Y \in \{0, 1\}$, and ...
2
votes
1answer
66 views

Clustering without test set and evaluation

I have to classify some data without any futher prediction (I just need the best clusters on the data). Do I still have to train-test-split my data or do a kfoldCV? And how do I evaluate my ...
1
vote
0answers
130 views

FE and clustered standard errors for a panel with firms, industries and years

I have an unbalanced panel of firms, years and industries. (1) At the moment I am running a panel regression with years and industries FE. My understanding is that I am counting for any omitted ...
2
votes
0answers
139 views

Adjusting for clustering and overdispersion in count models

My question is specific to the estimation of glm's and correcting for 'clustering' in a quasi-experiment (difference-in-differences). My outcome is counts of crimes....
0
votes
0answers
95 views

Replication of Stata commnad in R

I am not very good at working in R, usually I am working with stata. I just need to replicate one study in R. The command, which I need to replicate from Stata is : ...
0
votes
0answers
19 views

(How) can “de-meaning” help me solve this “clustering” issue?

I'm not particularly advanced when it comes to statistics and data analysis and have a problem I can't seem to solve. Basically, suppose you're doing school research and have three groups (to which ...
0
votes
1answer
194 views

Rearranging a Regression equation

I have what is probably a simple regression question but I thought I should ask since I don't have anywhere to verify it. I have an equation similar to as follows: $x_t = x_{t-1} + \alpha.Price_t$ ...
5
votes
2answers
984 views

Clustered standard errors - Why are SE smaller or bigger than OLS depending on cluster level?

I am analyzing some data using an OLS model. Data represent managers working for US cities. Within each city, we surveyed more than one manager (max 5). Multiple cities per state were surveyed. I'd ...
1
vote
0answers
85 views

Are Poisson Regressions with Serial Correlation Biased or Inconsistent? (No Fixed Effects)

Let's say I've got panel data where a count outcome $y$ and continuous independent variable $x$ observed each time period $t=(1,2,...T)$ for each individual $i$. I am interested in how $x_{it}$ ...
0
votes
1answer
371 views

Cluster-robust standard errors in panel data analysis

In a simple panel data analysis with data on 64 firms over 8 years, I use cluster-robust standard errors (at the firm level) to evaluate significance of coefficients. I observe important differences ...
0
votes
0answers
1k views

How should clustering be accounted for in logistic regression, when there are very few clusters?

I have survey data from 1000 patients. This is a convenience venue-based sample. In a specific city, at 9 hospitals that happen to have a psychosocial program, patients can opt into the program if ...
1
vote
0answers
116 views

hierarchical bootstrapping and calculation of variance (in a Random-Effects ROC Analysis) in R

I would like to calculate the variance of the AUC of readers (for each reader and averaged results) giving a score(1-5) to ...
1
vote
2answers
2k views

R | Robust standard errors in panel regression clustered at level != Group Fixed Effects

I want to run a regression on a panel data set in R, where robust standard errors are clustered at a level that is not equal to the level of fixed effects. That is, I have a firm-year panel and I want ...
3
votes
1answer
332 views

Why does ignoring dependencies between observations *inflate* my standard errors?

In the introductions to books and review papers about modeling dependent (a.k.a., within-subjects, repeated-measures, clustered, longitudinal, hierarchical) data, it is very common to say that ...
1
vote
1answer
277 views

Fixed effect and clustering with 3 dimensional data

I have a sample of banks. These vary across time, rating agency and across countries. UPDATE: I trying to capture the effect of a regulatory change (dummy variable, 0/1) on a banks credit rating. I ...
1
vote
0answers
152 views

Logistic Regression: Using weights?

I am running a logistic regression model with the following data and variables: Independent variables (characteristics of a person coded as dummy) Test score (continuous variable between 0 and 1) ...
0
votes
1answer
61 views

Multilevel Model Application / Specification

I have some multilevel-data-structure, where I want to regress top 10 music chart listings (dependent variables: downloads and rank) on some song characteristics (Xi). The problem for me now comes ...
1
vote
0answers
262 views

Clustered standard errors vs. serial correlation

I have a probably simple question but I can't find an adequate answer. I have self-collected data from three monitors that measure temperature, humidity etc. I useed all three monitors simultaneously ...
0
votes
0answers
564 views

How to simulate data for generalized estimating equations (GEE) with logistic link function?

I am working with a pre/post test structure, measuring dichotomous outcomes. I am using GEE to estimate the coefficient for time (also a binary variable, 0 representing pre and 1 representing post), ...
5
votes
2answers
120 views

A Simple Formula for Clustered Standard Errors for a Univariate Regression with a Dummy Regressor

Suppose I have a simple cross-sectional regression like: $$y_i = \alpha + \beta \cdot D_i + \varepsilon_i,$$ where $D_i$ is a binary treatment flag and $i$ indexes individuals. $\beta$ is the ...
0
votes
1answer
3k views

Clustered standard errors are completely different in R than in STATA

I'm trying to reproduce a study in R. Here are its core elements: study wants to measure the effect of a transit strike on highway delay independent variables: strike: binary dateresidual: ...
0
votes
0answers
77 views

What's the difference between “cluster” option in linear regression and mixed models?

Is there a difference in estimates from linear regression with "cluster" option and linear mixed model? Take for example this scenario : "...dataset contains data on 400 schools that come from 37 ...
3
votes
0answers
291 views

Diff-in-diff: Individual outcomes and group-level treatment

Question: What are my best options for handling group-level correlations in a panel differences-in-differences model using StataSE 14.2? Background: I have a Differences-in-Differences (DiD) design ...
0
votes
1answer
31 views

Mediation with data from cluster RCT

I am using the R mediate package to look at mechanisms of change in a cluster randomized controlled trial. My code looks somewhat like this: ...
1
vote
0answers
425 views

Comparing the regression coefficients of two time periods using unbalanced panel data and a fixed effects model

I'm currently trying to investigate how investors change their asset allocation due to liquidity risk and if their behaviour has changed since the financial crisis. My data contains the asset ...
1
vote
1answer
1k views

Double-clustered standard errors and large panel

I have a large panel data set featuring the purchases of 5000+ individuals over 2000+ time periods (days). I am looking to estimate pooled OLS regressions featuring double-clustered standard errors (...
3
votes
1answer
306 views

Calculating nested clustered standard errors with bootstrap

I'm trying to figure out how to calculate clustered standard errors via boostrap when the clusters are nested. I know that when there is a single level of clustering, you sample at the cluster level ...