The aimer package implements the aimer algorithm as described in Ding and McDonald 2017. The code below generates data with 100 rows and 1000 columns, uses cross-validation to select the optimal number of columns, eigenvectors, and threshold for the coefficients, and plots a heatmap of the cross-validation error between the remaining two parameters when one of the three is fixed at the optimal level.

library(aimer)
dat = factorModelSim1(100,1000,5,c(5,1),2,.1,.1)
MyCV = findThresholdSelect(dat$X, dat$Y, seq(2, 50, 2))
plot(MyCV)


dajmcdon/aimer documentation built on May 6, 2019, 1:31 a.m.