I want to split my sample into a training and a testing set in order to cross-validate my findings. However, I am not sure in which point in the process I have to do the split.
Here is the order I want to do the analysis:
- Descriptive analysis on the whole sample
- Split into training and testing set
- Correlation analysis only on the training set (kick out highly correlated variables)
- Logistic regression only on the training set
- Use resulting logistic model on the testing sample and validate
Is this correct?
Thanks for your help in advance