How to split the data into random samples of equal size (approx. 50%)?
Hi.
I have a data sample and want to perform factor analysis. First I want to use randomly selected 50% of the sample for a principal component analysis, and then the other 50% for a confirmatory analysis, but I'm not sure how I can split the sample and then use the other half later on.
Please help :) Thanks!
Comments
Hmm I think you might want to do this many times, and that would be easiest to achieve in R. In JASP, if you just want to do this once, I guess you can create a new column with random 0 and 1's, then use that to filter either one subset or the other. (e.g., multiply the data column with the random column and then filter out the 0's, and do it the other way around for the other half)
E.J.