Function to perform overlap analysis between train and test datasets. The function performs principal component analysis (PCA) on the covariates for both sets and calculates the Kolmogorov-Smirnov test for overlap.
overlapping(train_data, test_data, x)The function prints the superposition graph and the results of the Kolmogorov-Smirnov test.
Train Dataset indicating the old policy sample.
Test Dataset indicating the new policy sample.
Vector of predictor variables.