Dear Statalisters,
pwcorr is an excellent command for getting pairwise pearsons correlation coefficients across a number of different variables in an 'all against all' manner. It has the added advantage that the matrix it produces can easily then produce a heatplot, if you are a believer in this method of data presentation.
Is there an equivalent bit of code that I have been unable to find that will calculate simple univariate linear regressions between all the different variables (again in an all against all manner). I note, that unlike correlation coefficients, regressions are directional a ~ b is not the same as b ~a, and therefore one can envisage the top right of the output matrix being b ~a and the bottom left of the matrix a ~ b.
Many thanks for your thoughts
Robert Shaw
pwcorr is an excellent command for getting pairwise pearsons correlation coefficients across a number of different variables in an 'all against all' manner. It has the added advantage that the matrix it produces can easily then produce a heatplot, if you are a believer in this method of data presentation.
Is there an equivalent bit of code that I have been unable to find that will calculate simple univariate linear regressions between all the different variables (again in an all against all manner). I note, that unlike correlation coefficients, regressions are directional a ~ b is not the same as b ~a, and therefore one can envisage the top right of the output matrix being b ~a and the bottom left of the matrix a ~ b.
Many thanks for your thoughts
Robert Shaw
Comment