FamaMacBeth kernel covariance over-rejects in short panels
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 18/100
Línea de trabajo
Start by running the reproduction script in the issue, which fits FamaMacBeth with cov_type="kernel" and counts rejections of the x coefficient at the 5% level. Then read the cov_type handling in FamaMacBeth.fit and the f_statistic_robust method, along with the docstrings the issue says describe the problem. The issue leaves the fix open between fixed-b critical values and a cosine estimator, so the work needs a maintainer decision first. Done means the kernel-covariance tests reach roughly nominal size at T = 10 and T = 40.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
With cov_type="kernel", the t-tests of FamaMacBeth reject a true null far more often than their nominal level, even when the cross-sectional estimates are independent.
import numpy as np
import pandas as pd
from linearmodels import FamaMacBeth
rng = np.random.default_rng(0)
n, t, reps = 100, 10, 2000
idx = pd.MultiIndex.from_product([range(n), range(t)])
rejections = 0
for _ in range(reps):
data = pd.DataFrame(
{"y": rng.standard_normal(n * t), "x": rng.standard_normal(n * t), "const": 1.0},
index=idx,
)
res = FamaMacBeth(data.y, data[["const", "x"]]).fit(cov_type="kernel")
rejections += res.pvalues["x"] < 0.05
print(rejections / reps) # 0.174
The 5% test rejects in 17.4% of the samples with T = 10 and in about 12% with T = 40. With cov_type="unadjusted" both are about 5%. The joint test in f_statistic_robust is worse with more parameters: about 37% with 3 parameters and T = 10.
A kernel estimate of the long-run variance from T estimates is much noisier than the sample variance, and the t(T - 1) and F reference distributions ignore this. The docstrings describe the problem as of 7.1.
Deferred from 7.1. Possible fixes are fixed-b critical values (Kiefer and Vogelsang, 2005) or an equal-weighted cosine estimator with t and F reference distributions (Lazarus, Lewis, Stock and Watson, 2018).
- Lenguaje dominante
- Python
- Estrellas
- 1.1k
- Forks
- 203
- Merge medio
- 3 h 26 min
- PR fusionados (30 d)
- 115
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de bashtage/linearmodels
-
enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 15/100
bashtage/linearmodels#832 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
bashtage/linearmodels#831 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
IV: LIML kappa with an endogenous regressor spanned by the instruments, kappa's unit dependence, scale-dependent instrument rank checkPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertobug
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
bashtage/linearmodels#823 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
bashtage/linearmodels#780 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
bashtage/linearmodels#714 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de bashtage/linearmodels
Issues similares
-
ReadQwen3PaperTask5 rejects correct answers that differ only in order, case, or underscore formPosiblemente ocupada @Kingpython123 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 90/100
Tongyi-MAI/MobileWorld#72 ·
-
_threads/application: Update typing annotations using `pyupgrade --py311-plus`Posiblemente ocupada @gudnimg la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Health probes return 401 when authentication is enabled and the API is served under /orbPosiblemente ocupada @fgogolli la tomó hoy. Abiertoarea: api priority: p2 size: S type: bug
Dificultad 2/5 Medio día Aptitud para principiantes 75/100
finos/open-resource-broker#704 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
BCDA-APS/polar-bits#93 ·
-
bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
GoogleCloudPlatform/gce-rescue#218 ·
Los mantenedores suelen responder en 2 días