Skip to content

xtfifevd

1.1.0Package record

Panel Fixed Effects Filtered and Variance Decomposition Estimation

0packages depend
1.8Kdownloads / year
86.4%test coverage
13/13flavors OK

Overview

About

Implements fixed effects estimators for time-invariant variables in panel data models. Provides three estimation methods: FEVD (Fixed Effects Vector Decomposition) from Plumper and Troeger (2007) doi:10.1093/pan/mpm002, and FEF (Fixed Effects Filtered) and FEF-IV (instrumental variables variant) from Pesaran and Zhou (2018) doi:10.1080/07474938.2016.1222225. All methods use the Pesaran and Zhou variance estimators, which account for generated regressor uncertainty, and report the full covariance matrix of the time-varying, time-invariant and intercept coefficients.

Changes in 1.1.0
  • Formula handling: the right-hand side is now split at the top-level | and each part is built with model.frame() and model.matrix(), so transformations such as log(x), I(x^2), x:w and log(y) and factors (with their contrasts) are handled as in lm(). Previously all.vars() was used and the raw columns were read, so transformations were silently dropped or split. Intercept columns are removed from both parts. A factor id with unused levels now works (levels are dropped). Duplicated (id, time) pairs are now an error.
  • Variance of the time-varying coefficients beta: the reported block of vcov() was the homoskedastic sigma2_e (X'MX)^-1, while the variance of gamma used the panel-robust matrix of Pesaran and Zhou (2018, eq. 18). The robust matrix is now reported for beta everywhere. New argument vcov_beta = c("robust", "classical") in xtfifevd(), fevd(), fef() and fef_iv(); the chosen matrix is also used inside the Pesaran and Zhou variance of gamma and of the intercept. Both matrices are returned in V_beta_robust and V_beta_classical.
Show all changes in 1.1.0Hide the rest of the changes in 1.1.0
  • Full covariance matrix: vcov() was block diagonal. It now contains the covariance between gamma and beta from Pesaran and Zhou (2018, eq. A.11), Cov(gamma, beta) = -Qzz^-1 Qzxbar Var(beta), and the variance of and covariances with the intercept alpha = ubar - zbar' gamma (eq. 5) by the delta method. The same derivation is applied to FEF-IV with the instrument projections (eq. 48 and 51). The previous intercept standard errors (stage 2 OLS for FEF, s^2 ginv([1, R]'[1, R])[1, 1] for FEF-IV) are no longer used.
  • fevd() now runs the three stages of Plumper and Troeger (2007) literally: within FE regression, unit-level regression of the time-averaged FE residuals on an intercept and z, and pooled OLS of y on an intercept, x, z and the unexplained unit effect h_i. Previously no stage 3 was run and fevd() returned the FEF results. The stage 3 coefficients are returned in stage3$coefficients, the coefficient on h_i in delta (equal to 1 by construction, Pesaran and Zhou 2018, Proposition 3, also in unbalanced panels), and the naive stage 3 standard errors in stage3$se_naive for reference only. Inference continues to use the Pesaran and Zhou standard errors; the documentation states that the naive stage 3 standard errors are too small for the time-invariant coefficients (Breusch, Ward, Nguyen and Kompas 2010, Theorem 3; Greene 2011) and why an intercept is included in stage 2. Stage 2 is unit-level and unweighted in unbalanced panels; Plumper and Troeger are silent on unbalanced panels.
  • Rarely changing variables after |: the unit (panel) mean is now used in all stages (previously the first-period value was used silently); the warning is kept and documented.
  • bw_ratio(): the print header now says "SD Ratios" (Plumper and Troeger 2007 define the b/w ratio as the between SD over the within SD). The guidance no longer states a single 1.7 threshold: the thresholds of Plumper and Troeger (2007, Fig. 4; N = 30, T = 20) are about 0.2, 1.7, 2.8 and 3.8 for corr(z, u) of 0, 0.3, 0.5 and 0.8, the correlation is not observable or testable, the coefficient is biased whenever it is non-zero, and Plumper and Troeger offer no simple rule of thumb.
  • sigma2_u is now the variance of the unexplained unit effect (stage 2 residual variance minus sigma2_e * mean(1 / T_i), truncated at zero). Previously it was the variance of the time-averaged FE residuals, which includes z'gamma and sigma2_e / T. The summary label says so.
  • print(summary()) now shows the installed package version (previously a hard-coded "1.0.0") and cites Pesaran and Zhou (2018) (previously 2016).
  • MASS is no longer imported; utils is.
  • New tests pin the FEF and FEF-IV coefficients and the full covariance matrix to hand computations of the Pesaran and Zhou formulas, the formula parser to lm() on the transformed data, the robust beta covariance to plm::vcovHC(method = "arellano", type = "HC0") (skipped when plm is not available), and delta = 1.

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 57 s · r-oldrel-windows-x86_64
Status changes
  • OK13 OK2026-08-04
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK5 OK2026-04-29
Advisories

none known

Documentation

In release 1.1.0
READMEYes · 498 wordsVignettesNoNEWSYes · 100% structured · mentions 1.1.0Citation fileYes · software entry onlyWebsitenot declared in DESCRIPTION
Help pages
5 (3 internal)includes a package overview page
Examples that run
100%2 run in a plain check
Exported functions with examples
100%
Documented parameters
100%
Return-value docs
100%
Help pages citing references
60%

Downloads

1.8K
CRAN downloads in the past year
Rank #14,279 · ~5/day · ~153/mo
Daily download trend is not available in this view yet.
32630 days
83590 days
1.8K1 year
Compare downloads with other packages →
Also on32 r2u3 autocran

Repository

1Stars
0Forks
0Open issues
0Open PRs
2Releases
11Commits
2Commit identities
11 commits · Last activity 2026-10-02 · 0% stars, 30d
Responsiveness
not measured

Stars over time

2026-07-07 · 02026-07-10 · 1
PracticesBeta

2 development-tooling and community-health practices detected across 2 families in the upstream repository

Checks run against github.com/muhammedalkhalaf/xtfifevd on 2026-10-22.

Governance and community (1)

The repository owner accepts GitHub Sponsors

CRAN release process (1)
cran-comments.md
How this is detected·Detection ruleset v4 (2026-10-20)
AI coding toolsBeta

This repository shows signs of AI coding tools.

  • Claude Codefirst seen 2026-09-27
    Commits: at least 2 crediting it in the message
Models named in its commits
  • Claude Fable 5.12 commits · Sep to Oct 2026
Counts are commits, not lines of code. Commits by a tool's accounts count once across all of its accounts. Commits crediting it are the largest count among its credit lines, a minimum.How this is detected·Detection ruleset v4 (updated 2026-09-27)

Dependencies

Declared dependencies
2 external dependencies (excludes base and recommended)

Installing xtfifevd adds no packages beyond those that come with R.

Depends (1)
R >= 4.1.0
Imports (2)
statsutils
LinkingTo (0)
none
Suggests (2)
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

People & History

People (1)
Author, Maintainer since 1.0.2 (2026), Copyright holder
Releases (2)

Pick two releases to compare their code metrics.

  • 1.1.0Latest
    record
    2026-10-01 · current release · diff ↗
  • 1.0.2
    record
    2026-04-28
  • R
    R 4.6.0 released · 2026-04-24

Package metadata

First published
2026-04-28
Total releases
2 / 1 yrs
License
GPL-3 OSI
Minimum R
≥ 4.1.0
Download size
28 KB

Cite

Cite this package

Run in R for the authors' entry:

citation("xtfifevd")

The package provides a citation file, so citation() returns the authors' own entry.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for xtfifevd version 1.1.0 [Data set]. HJJB, LLC. Data release v2026-10-24. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-24, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy