# Tag Info

## Hot answers tagged panel-data

### What percentage of a population needs a test in order to estimate prevalence of a disease? Say, COVID-19

1) Making some assumptions about the population size (namely that it is large enough that a binomial model is appropriate), the prevalence of a disease in a population at a particular time can be ...
• 36.5k
Accepted

### How exactly does a "random effects model" in econometrics relate to mixed models outside of econometrics?

Summary: the "random-effects model" in econometrics and a "random intercept mixed model" are indeed the same models, but they are estimated in different ways. The econometrics way is to use FGLS, and ...
• 6,721

Accepted

### Difference-in-differences with individual level panel data

A nice feature of difference-in-differences (DiD) is actually that you don't need panel data for it. Given that the treatment happens at some sort of level of aggregation (in your case cities), you ...
• 19.1k
Accepted

### Panel data diff-in-diff and the pattern of the binary treatment indicator

I will assume you have a thorough grasp of the two group/two period difference-in-differences (DD) design and you now want to extend your intuition of the method to the multi-group/multi-period case. ...
• 6,019

### What percentage of a population needs a test in order to estimate prevalence of a disease? Say, COVID-19

It has been answered by Dimitri Pananos, I will only add that in order to estimate the prevalence with pre-set precision you need an absolute sample size which is pretty much invariant with the ...
• 8,608
Accepted

### Restricted Maximum Likelihood (REML) Estimate of Variance Component

NB. I simplify notation somewhat and do not use bold typesetting. The following rules for matrix differentials are useful: \begin{align} d\log \vert A\vert &= \mathrm{tr}(A^{-1}dA) \\ dA^{-1} &...
• 4,541

### How exactly does a "random effects model" in econometrics relate to mixed models outside of econometrics?

I am not really familiar enough with R to comment on your code, but the simple random intercept mixed model should be identical to the RE MLE estimator, and very close to the RE GLS estimator, except ...
• 35.5k
Accepted

### How to conduct a multilevel model/regression for panel data in Python?

Linear regression will not be suitable for a multilevel model. A mixed effects model is a good way to fit most multilevel models. In python you can use mixedlm in <...
• 60.9k

Definitely! ...
• 62.5k

### longitudinal data with unequal samples and end points

A few points: Random effects provide a flexible framework for modeling serial correlations. This is achieved by specifying nonlinear functions of time in the random-effects part of the model. An ...
• 21.1k
Accepted

### Difference in difference with interaction

A triple difference-in-difference is the correct specification for this problem. I'll present a conceptual explanation and then a mathematical one. Conceptually, the standard (double) difference-in-...
• 4,600
Accepted

• 33.3k
Accepted

### Panel Data: Pooled OLS vs. RE vs. FE Effects

First, you are right, Pooled OLS estimation is simply an OLS technique run on Panel data. Second, know that to check how much your data are poolable, you can use the Breusch-Pagan Lagrange multiplier ...
• 1,019

### Any way to test if the association between X and Y could be causal, reverse-causal or non-causal (just correlation)?

As has been discusssed extensively, evidence for causation does not come from data. It comes from understanding the data generating process, the meaning of the measurements, the subject matter ...
• 92.3k
Accepted

### Any way to test if the association between X and Y could be causal, reverse-causal or non-causal (just correlation)?

To argue that this relationship is causal, you need an exogenous shock which only affects X and does not directly affect Y. Moreover, the shock should not affect other factors related to Y, otherwise ...
• 373

### longitudinal data with unequal samples and end points

I believe that you are fine to use the approach you outlined in your question. There is more between id variance at time==0 (the random intercept) than there is in the rate of change (random slope for ...
• 4,715

### longitudinal data with unequal samples and end points

I have found that for data similar to yours the fit of the model to the actual correlation patterns is crucial. For example if you use random effects and the induced correlation pattern is not what ...
• 92.3k
Accepted

### Panel vector autoregression models in R?

There is your solution. Code will be available soon. https://papers.ssrn.com/sol3/papers.cfm?abstract_id=2896087 Panel Vector Autoregression in R: The Panelvar Package: This paper considers two ...
Accepted

### Demeaning with two (n) fixed effects in panel regressions

If you use demean approach (which is theoretically right), then you have to do demean your data both cross sectionally and time series (irrespective of the order). See how it is works. Assume ...
• 2,320

### How to determine the appropriate number of lags when using Newey-West (or HAC) standard errors

My answer is going to expand on what @Achim mentioned as "the growth rate of this lag length parameter". Newey & West (1987, Econometrica, p. 705) show that their estimator for the ...
• 1,030

### PSM on panel data , R-square is low at (first stage) logit regression

The reason to use propensity scores is to create balanced groups on your set of covariates. Your R-square, the plausibility of your selection model, and any other considerations about the propensity ...
• 33.5k
Accepted

### What is cross-lagged panel design?

The cross-lagged panel model (CLPM) is a type of structural equation model (specifically a path analysis model) that is used where two or more variables are measured at two or more occasions and ...
• 60.9k