Package: fgls 0.1.0

Emilio González-Coya

fgls: Feasible GLS for Serial Correlation and Heteroskedasticity

Feasible generalized least squares (FGLS) estimators for linear regressions whose errors are serially correlated, heteroskedastic of unknown form, or both. Serial correlation is handled by the autoregressive filter of Perron and González-Coya (2026) <doi:10.1016/j.jeconom.2026.106346>, estimated from a Durbin regression whose order is chosen by an information criterion, with a variance estimator that stays valid when the regressors are only pre-determined rather than strictly exogenous. Heteroskedasticity is handled by the adaptive Lasso estimate of the skedastic function of González-Coya and Perron (2024) <doi:10.1515/jem-2023-0007>, with a bias-corrected sandwich variance. Both corrections can be combined. Benchmark estimators (ordinary least squares with heteroskedasticity and autocorrelation consistent standard errors, Cochrane-Orcutt, infeasible GLS) and the simulation designs of both papers are included.

Authors:Emilio González-Coya [aut, cre, cph]

fgls_0.1.0.tar.gz
fgls_0.1.0.zip(r-4.7-any)fgls_0.1.0.zip(r-4.6-any)
fgls_0.1.0.tar.gz(r-4.7-any)fgls_0.1.0.tar.gz(r-4.6-any)
fgls_0.1.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
fgls/json (API)

# Install 'fgls' in R:
install.packages('fgls', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/emiliogcs/fgls/issues

Pkgdown/docs site:https://emiliogcs.com

On CRAN:

Conda:

3.40 score 20 exports 10 dependencies

Last updated from:a32f0812ed. Checks:6 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develOK201
source / vignettesOK208
linux-releaseOK154
windows-develOK127
windows-releaseOK166
wasm-releaseOK113

Exports:adf_testar_rootscochrane_orcuttcompare_fglsdurbin_estimatorfglsfgls_controlhybrid_glsinfeasible_glslasso_fglsmake_dictionarynonexogeneity_shareols_robustserial_fglssimulate_combinedsimulate_heterosimulate_predictivesimulate_serialtest_predeterminedweight_diagnostics

Dependencies:codetoolsforeachglmnetiteratorslatticeMatrixRcppRcppEigenshapesurvival

Getting started with fgls
Three examples | Serial correlation | Heteroskedasticity of unknown form | Both | Working with fits | Time series inputs | Choosing options | References

Last update: 2026-11-07
Started: 2026-11-07

Heteroskedasticity of unknown form (González-Coya and Perron, 2024)
The idea | An example | Candidate covariates | No loss under homoskedasticity | Alternatives and benchmarks | Weights and robustness options | Computation

Last update: 2026-11-07
Started: 2026-11-07

Serial correlation (Perron and González-Coya, 2026)
The problem | The estimator | Table 1 of the paper | Variance and inference | Lag selection | Lagged dependent variables | MA(1) errors | Checking pre-determinedness

Last update: 2026-11-07
Started: 2026-11-07

Serial correlation and heteroskedasticity together
The first-stage correction | No loss under homoskedasticity | Bootstrap cross-check

Last update: 2026-11-07
Started: 2026-11-07

Validation: replicating the papers and agreement with pyfgls
Perron and González-Coya (2026), Table 1 | Perron and González-Coya (2026), Tables 2--5 (selected cells) | González-Coya and Perron (2024), Table 1 | Supplement, Table S.9: F-C and F-CH | Agreement with pyfgls

Last update: 2026-11-07
Started: 2026-11-07

Readme and manuals

Help Manual

Help pageTopics
Augmented Dickey-Fuller test (screening)adf_test print.fgls_adf
Compare fits side by sidecompare_fgls
Feasible GLS for serial correlation and/or heteroskedasticityfgls
Advanced options for fglsfgls_control
Tidy, glance and augment fgls fitsaugment.fgls fgls-broom glance.fgls tidy.fgls
Conditions signaled by fglsfgls-conditions
Methods for fgls fitsconfint.fgls df.residual.fgls fgls-methods fitted.fgls formula.fgls model.frame.fgls model.matrix.fgls nobs.fgls predict.fgls print.fgls residuals.fgls terms.fgls vcov.fgls
Feasible GLS under heteroskedasticity of unknown form (González-Coya and Perron, 2024)lasso_fgls
Candidate covariates for the skedastic functionmake_dictionary
Benchmark estimatorscochrane_orcutt durbin_estimator hybrid_gls infeasible_gls ols_robust
Diagnostic plots for fgls fitsplot.fgls
Feasible GLS for serially correlated errors (Perron and González-Coya, 2026)serial_fgls
Simulate the designs of the paperssimulate_combined simulate_hetero simulate_predictive simulate_serial
Summarize an fgls fitprint.summary.fgls summary.fgls
Test whether lags of the regressors are missing (pre-determinedness)print.fgls_predetermined test_predetermined
Diagnostics of an fgls fitar_roots nonexogeneity_share weight_diagnostics