PCP for environmental health / epidemiology.
This version of PCP uses the non-convex rank approximation and the square root of the residual term in the objective function, along with distinct penalties for values less than the limit of detection (<LOD).
This repo includes:
pcpr.R
file with PCP-LOD andgrid_search_cv
with CV functionsfunctions.R
loads packages and includes some helper functionsNHANES
foldernhanes_cleaning.R
includes a function to clean the NHANES data and makes a figurenhanes_pops_50.Rmd
includes analysis and makes some figuresnhanes_pops_75.Rmd
includes sensitivity analysis and makes a figureData
subfolder has original NHANES SAS file and R object with saved CV fits
Sims
foldersim_grid.R
makes the simulated datasetssim_pca.R
runs PCA on all simulated datasetssim_ncvx_cv.R
cross-validates PCP-LOD on all simulated datasetssim_ncvx_pcp.R
runs PCP-LOD on all simulated datasetsmake_figures.R
makes figures for the manuscriptSim Data
subfolder has CV fits