Overview
PCAmatchR optimally matches a set of population-based controls to cases. PCAmatchR converts user-provided principal components (PC) into a Mahalanobis distance metric for selecting a set of well-matched controls for each case.
PCAmatchR takes as input user defined PCs and eigenvalues and directly outputs optimal case and control matches.
Important Note
The optmatch code is not contained in this package. In order to use PCAmatchR, users must manually install and load the optmatch package (>=0.9-1) separately and accept its license. Manual loading is necessary due to software license issues. If the optmatch package is not loaded, the PCAmatchR main function, match_maker()
, will fail and display an error message. For more information about the optmatch package, please see the reference below.
Installation
To install the release version from CRAN:
install.packages("PCAmatchR")
To install the development version from GitHub:
devtools::install_github("machiela-lab/PCAmatchR")
Available functions