Will subset X based upon the variables specified in the formula to ensure it contains only the covariates of interest.
Simplified the example code.