Dear Statalistmembers,
I am using Stata 18 for windows. I want to use the ssc available plugin cpcorr to measure correlation between variables. In addition, I would like to do so using 2 samples, which I created using a dummy variable called sample. However, in difference to the normal corr or pwcorr, it shows me that the command by is not allowed. Does anyone have a suggestion for this? As I am creating a handful of those correlation outputs, I hope to find a more elegant way than to run a a preserve/ restore query with keep if sample==1 or 0.
Best,
Moritz
I am using Stata 18 for windows. I want to use the ssc available plugin cpcorr to measure correlation between variables. In addition, I would like to do so using 2 samples, which I created using a dummy variable called sample. However, in difference to the normal corr or pwcorr, it shows me that the command by is not allowed. Does anyone have a suggestion for this? As I am creating a handful of those correlation outputs, I hope to find a more elegant way than to run a a preserve/ restore query with keep if sample==1 or 0.
Best,
Moritz
Comment