FarmTest: Factor Adjusted Robust Multiple Testing

Performs robust multiple testing for means in the presence of known and unknown latent factors. It implements a robust procedure to estimate distribution parameters using the Huber's loss function and accounts for strong dependence among coordinates via an approximate factor model. This method is particularly suitable for high dimensional data when there are many variables but only a small number of observations available. Moreover, the method is tailored to cases when the underlying distribution deviates from Gaussian, which is commonly assumed in the literature. Besides the results of hypotheses testing, the estimated underlying factors and diagnostic plots are also output. Multiple comparison correction is done after estimating the proportion of true null hypotheses using the method in Storey (2015) <https://github.com/jdstorey/qvalue>. See the paper on the 'FarmTest' method, Zhou et al.(2017) <https://goo.gl/68SJpd>, for detailed description of methods and further references.