fit_genotype_ccm() currently checks to see if the full model matrix is full rank and errors if not. I've added code to check this and drop a term for batch effect correction if doing so makes the model not full rank. However, based on a discussion with Cole, this entire function might be somewhat bespoke and not something that a general Platt user would want to use. It might be better to move this function to zscapetools or elsewhere.