Between Estimator
The Between Estimator regresses on the unit means of the variables — exploiting between-unit variation rather than the within (time) variation used by Fixed Effects. It answers "do units with a higher average have a higher average ".
When to use
Use Between when you care about long-run differences across units (e.g. comparing countries/firms by their averages). RE is essentially a weighted average of Between and Within.
Model specification
OLS on the unit-averaged data.
Running in EcoLab
- Modeling module → Linear panel data family → Between.
- Declare entity/time, , .
- Run; contrast with FE (within) to analyze the source of variation; export the replication code.
Replication code
- Stata
- R
- Python
* ---- Between Estimator ----
use "panel_data.dta", clear
xtset id time
* Between estimator (regression on unit means)
xtreg y x1 x2, be
# ---- Between Estimator ----
library(plm)
# Load panel data (illustrative)
df <- read.csv("panel_data.csv")
pdata <- pdata.frame(df, index = c("id", "time"))
# Between estimator
model_be <- plm(y ~ x1 + x2, data = pdata, model = "between")
summary(model_be)
# ---- Between Estimator ----
import pandas as pd
from linearmodels.panel import BetweenOLS
# Load panel data (illustrative)
df = pd.read_csv("panel_data.csv")
df = df.set_index(["id", "time"])
y = df["y"]
X = df[["x1", "x2"]]
model_be = BetweenOLS(y, X).fit()
print(model_be)
Limitations
- Ignores time variation; does not control for individual effects like FE.
- Loses dynamic information.
Video tutorial
Video Tutorial: Running the Between estimator in EcoLab
See also
- FEM/REM · Pooled OLS · Catalog