Package: swaprinc Title: Swap Principal Components into Regression Models Version: 1.0.1.9000 Authors@R: person("Mackson", "Ncube", , "macksonncube.stats@gmail.com", role = c("aut", "cre", "cph")) Description: Obtaining accurate and stable estimates of regression coefficients can be challenging when the suggested statistical model has issues related to multicollinearity, convergence, or overfitting. One solution is to use principal component analysis (PCA) results in the regression, as discussed in Chan and Park (2005) . The swaprinc() package streamlines comparisons between a raw regression model with the full set of raw independent variables and a principal component regression model where principal components are estimated on a subset of the independent variables, then swapped into the regression model in place of those variables. The swaprinc() function compares one raw regression model to one principal component regression model, while the compswap() function compares one raw regression model to many principal component regression models. Package functions include parameters to center, scale, and undo centering and scaling, as described by Harvey and Hansen (2022) . Additionally, the package supports using Gifi methods to extract principal components from categorical variables, as outlined by Rossiter (2021) . License: MIT + file LICENSE Encoding: UTF-8 Roxygen: list(markdown = TRUE) RoxygenNote: 7.2.3 URL: https://github.com/mncube/swaprinc BugReports: https://github.com/mncube/swaprinc/issues Imports: broom, broom.mixed, dplyr, Gifi, lme4, magrittr, rlang, tidyselect Suggests: testthat (>= 3.0.0) Config/testthat/edition: 3 Config/pak/sysreqs: cmake make libicu-dev Repository: https://mncube.r-universe.dev Date/Publication: 2023-04-18 23:42:49 UTC RemoteUrl: https://github.com/mncube/swaprinc RemoteRef: HEAD RemoteSha: 9d9ef19b7c0da66b591fb5c8c321da9784eac441 NeedsCompilation: no Packaged: 2026-07-03 20:55:12 UTC; root Author: Mackson Ncube [aut, cre, cph] Maintainer: Mackson Ncube