Hi all, I have a list of x variables, from x1 through x10, and a list of y variables, from y1 through y10. I am interested in reporting correlation coefficients between x1 and y1, x2 and y2, and so on through x10 and y10. I do not require other coefficients. What would be the best way to export the results? It would be wonderful if anyone could create a table with x vars on the top row and y vars on the first column and the coefficients placed diagonally on the matrix table.
You can use the following code to generate data to illustrate the required process.
Thanks!
You can use the following code to generate data to illustrate the required process.
Thanks!
Code:
clear all set seed 12456789 set obs 5 forvalues i = 1/10{ gen x`i' = runiform(0, 1) } forvalues i =1/10{ gen y`i' = rpoisson(1)*400 }
Comment