Other packages > Find by keyword >

swaprinc  

Swap Principal Components into Regression Models
View on CRAN: Click here


Download and install swaprinc package within the R console
Install from CRAN:
install.packages("swaprinc")

Install from Github:
library("remotes")
install_github("cran/swaprinc")

Install by package version:
library("remotes")
install_version("swaprinc", "1.0.1")



Attach the package and use:
library("swaprinc")
Maintained by
Mackson Ncube
[Scholar Profile | Author Map]
First Published: 2023-04-17
Latest Update: 2023-04-17
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) <doi:10.1080/01446190500039812>. 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) <https://cran.r-project.org/package=LearnPCA/vignettes/Vig_03_Step_By_Step_PCA.pdf>. Additionally, the package supports using Gifi methods to extract principal components from categorical variables, as outlined by Rossiter (2021) <https://www.css.cornell.edu/faculty/dgr2/_static/files/R_html/NonlinearPCA.html#2_Package>.
How to cite:
Mackson Ncube (2023). swaprinc: Swap Principal Components into Regression Models. R package version 1.0.1, https://cran.r-project.org/web/packages/swaprinc. Accessed 23 Apr. 2025.
Previous versions and publish date:
No previous versions
Other packages that cited swaprinc R package
View swaprinc citation profile
Other R packages that swaprinc depends, imports, suggests or enhances
Complete documentation for swaprinc
Functions, R codes and Examples using the swaprinc R package
Some associated functions: compswap . pipe . swaprinc . swaprinc_loud . 
Some associated R codes: compswap.R . swaprinc.R . utils-pipe.R .  Full swaprinc package functions and examples
Downloads during the last 30 days
03/2403/2503/2603/2703/2803/2903/3003/3104/0104/0204/0304/0404/0504/0604/0704/0804/0904/1004/1104/1204/1304/1404/1504/1604/1704/1804/1904/2004/21Downloads for swaprinc0246810121416182022TrendBars

Today's Hot Picks in Authors and Packages

nextGenShinyApps  
Craft Exceptional 'R Shiny' Applications and Dashboards with Novel Responsive Tools
Nove responsive tools for designing and developing 'Shiny' dashboards and applications. The scripts ...
Download / Learn more Package Citations See dependency  
GenomeAdapt  
Detecting Signatures of Local Adaptation Based on Ancestry Trajectories
Portable, scalable and highly computationally efficient tool for detecting signatures of local adapt ...
Download / Learn more Package Citations See dependency  
pkgndep  
Analyze Dependency Heaviness of R Packages
A new metric named 'dependency heaviness' is proposed that measures the number of additional depend ...
Download / Learn more Package Citations See dependency  
BLRShiny2  
Interactive Document for Working with Binary Logistic Regression Analysis
An interactive document on the topic of binary logistic regression analysis using 'rmarkdown' and ...
Download / Learn more Package Citations See dependency  
rwt  
"Rice Wavelet Toolbox" Wrapper
Provides a set of functions for 1D and 2D wavelet and filterbank design analysis and processing. Fun ...
Download / Learn more Package Citations See dependency  
sociome  
Operationalizing Social Determinants of Health Data for Researchers
Accesses raw data via API and calculates social determinants of health measures for user-specified l ...
Download / Learn more Package Citations See dependency  

24,098

R Packages

207,311

Dependencies

65,069

Author Associations

24,099

Publication Badges

© Copyright since 2022. All right reserved, rpkg.net.  Based in Cambridge, Massachusetts, USA