Package: sdim 0.1.0

Gabriel Cabrera

sdim: An R Package for Supervised Dimension Reduction

Implements five factor extraction methods for asset pricing and macroeconomic forecasting: principal component analysis (PCA), partial least squares (PLS), scaled PCA (sPCA) of Huang, Jiang, Li, Tong, and Zhou (2022) <doi:10.1287/mnsc.2021.4020>, the reduced-rank approach (RRA) of He, Huang, Li, and Zhou (2023) <doi:10.1287/mnsc.2022.4563>, and Instrumented PCA (IPCA) of Kelly, Pruitt, and Su (2019) <doi:10.1016/j.jfineco.2019.05.001>.

Authors:Gabriel Cabrera [aut, cre]

sdim_0.1.0.tar.gz
sdim_0.1.0.tar.gz(r-4.7-arm64)sdim_0.1.0.tar.gz(r-4.7-x86_64)sdim_0.1.0.tar.gz(r-4.6-arm64)sdim_0.1.0.tar.gz(r-4.6-x86_64)
sdim_0.1.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
sdim/json (API)

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

Bug tracker:https://github.com/gabbocg/sdim/issues

Pkgdown/docs site:https://gabbocg.github.io

Uses libs:
  • openblas– Optimized BLAS
  • c++– GNU Standard C++ Library v3
Datasets:
  • grunfeld - Grunfeld (1958) investment dataset
  • he2023_dacheng202 - Dacheng 202-portfolio value-weighted returns from He, Huang, Li, Zhou
  • he2023_factors - Factor proxies from He, Huang, Li, Zhou
  • he2023_ff17vw - Fama-French 17-industry value-weighted portfolios from He, Huang, Li, Zhou
  • he2023_ff30vw - Fama-French 30-industry value-weighted portfolios from He, Huang, Li, Zhou
  • he2023_ff48ew - Fama-French 48-industry equal-weighted portfolios from He, Huang, Li, Zhou
  • he2023_ff48vw - Fama-French 48-industry value-weighted portfolios from He, Huang, Li, Zhou
  • he2023_ff5 - Fama-French 5-factor data from He, Huang, Li, Zhou
  • huang2022_ip - Industrial production growth from Huang, Jiang, Li, Tong, Zhou
  • huang2022_macro - FRED-MD macro predictors from Huang, Jiang, Li, Tong, Zhou

On CRAN:

Conda:

openblascpp

3.30 score 10 exports 2 dependencies

Last updated from:7e22bf9332. Checks:6 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK142
linux-devel-x86_64OK160
source / vignettesOK235
linux-release-arm64OK181
linux-release-x86_64OK154
wasm-releaseOK139

Exports:estimate_ar_resestimate_ardl_multieval_factorsipca_estoos_standardizepca_estpls_estrra_estselect_ar_lag_sicspca_est

Dependencies:RcppRcppArmadillo

Get started with sdim
Overview | Quick start | PCA, PLS, and RRA | Scaled PCA | IPCA | Prediction | Factor evaluation | Bundled datasets

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

IPCA with the Grunfeld dataset
The IPCA model | Data preparation | Fitting IPCA | Validation against the Python ipca package | Multiple factors | References

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

Replicating He et al. (2023)
Setup | Replication | Results | References

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

Replicating Huang et al. (2022)
Data | Methodology | Out-of-sample loop | Results | Key spca_est() features used | References

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