Instead of kmeans(Y, ...), use kmeans(t(ldr(t(Y))), ...), Y is n*p, p >> n. Much faster clustering, discriminant analysis, prediction models and machine-learning methods for high-dimensional data via Lossless Data Reduction (LDR), a simple pre-processing step. R, Matlab and SAS code based on: Qaqish, B. F., O'Brien, J. J., Hibbard, J. C. & Clowers, K. J. (2017). Accelerating high-dimensional clustering with lossless data reduction. BIOINFORMATICS 33, 2867-2872. DOI: 10.1093/bioinformatics/btx328

The Conditional Linear Family of Multivariate Bernoulli Distributions, Computation and Simulation: SAS/IML modules, based on Qaqish (2003, Biometrika 90, 455-63). By Bahjat Qaqish (2003).

Correlation bounds: R and Matlab code for computing correlation bounds and for simulation of many continuous, discrete and mixed-type bivariate distribuitions. Based on: Sergei Leonov & Bahjat Qaqish (2020). Correlated endpoints: simulation, modeling, and extreme correlations. Statistical Papers 61, 741-766. Online 2017. https://doi.org/10.1007/s00362-017-0960-2

Continuous Toxicity Monitoring in Phase II Trials in Oncology: DOS/Windows programs and sample input and output files for implementing the methods described in Ivanova, Qaqish & Schell (2005 Biometrics 61, 540-545)

Variance Components for Nested Binary Responses with Three Levels of Nesting (Example: Clinics/Physicians/Patients): R function, SAS macro. By Bahjat Qaqish and Habib Moalem (1993).

Orthogonalized Residuals: SAS macro for ORTH estimation of regression models for multivariate Bernoulli outcomes, with models for marginal means and pairwise log odds ratios. Based on: Bahjat Qaqish, Richard Zink & John Preisser(2012). Orthogonalized residuals for estimation of marginally specified association parameters in multivariate binary data. Scandinavian Journal of Statistics 39(3), 515-527.

Orthogonalized Residuals with model-based Lambda: SAS macro for ORTH estimation of regression models for multivariate Bernoulli outcomes, with models for the marginal means and pairwise log odds ratios. Allows various model-based choices for lambda, including lambda=0 (alternating logisitc regression, ALR). Estimation is by the method of Orthogonalized Residuals developed by the authors. By Richard Zink & Bahjat Qaqish.

Orthogonalized Residuals Regression Diagnostics: SAS macro for ORTH estimation and computation of regression diagnostics. By Kunthel By, John Preisser, Jamie Perin, Richard Zink and Bahjat Qaqish.

Orthogonalized Residuals Efficieny Calculations: Code for computing and plotting the asymptotic efficieny of ORTH, ALR and various other procedures, relative to GEE2 under various models for third and fourth moments. By Bahjat Qaqish.

GEE Regression Diagnostics: A SAS macro based on Preisser & Qaqish (1996, Biometrika 83, 551-62). By John Preisser (2003).

BLEX: Very fast GEE for logistic regression for binary outcomes with exchangeable correlation: A SAS macro optimized for LARGE cluster size. Runtime is linear in cluster size. BLEX is short for Binary Logit EXchangeable. By Bahjat Qaqish and Habib Moalem (1994).

Bivariate Logistic Regression: SAS/IML program for maximum-likelihood estimation (two marginal logits and a log odds ratio). By Bahjat Qaqish (2000).

Extra-binomial variation (Overdispersion): Sample SAS programs. By Bahjat Qaqish (2003).

GEE2: DOS Pascal source, IBM VM/CMS Pascal source, DOS/Windows Fortran source: executable and examples. The Fortran port of the original Pascal code was developed by a Population Council project funded by the University of North Carolina Evaluation Project (contract number 5-35676), itself funded by the United States Agency for International Development (contract number DPE-3060-C-00-1054-1). By Bahjat Qaqish (1989).

A Matrix Library in C. By Bahjat Qaqish (2003).

Software for profiling CPU and memory performance: Source code in C and Windowns executables. By Bahjat Qaqish (2005).

The Pool Adjacent Violators Algorithm (PAVA): A complete example of an R extension written in C. Includes a two-page introduction to writing R extensions in C. By Bahjat Qaqish (2003).