Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: accumulating pwcorr output

From   "Pijus Virketis" <[email protected]>
To   <[email protected]>
Subject   st: accumulating pwcorr output
Date   Mon, 30 Jun 2003 15:54:18 -0400

Dear all, 

I am calculating many pwcorr's in succession. Unfortunately, the
standard tabular output has too much filler to be used directly for
presentation of results, and I have been cutting the unneeded portions
by hand in a text editor. It would be great to be able to capture only
the needed output in a vector, and output only that: efficient to read
onscreen, and good for presenting on paper. In pseudocode, it would go
something like:

matrix q = (1\2\3\4\5\6\7\8\9\10)
matrix sig = (1\2\3\4\5\6\7\8\9\10)

forvalues k = 1/10 {
	quietly pwcor x`k' y`k', sig
	matrix q[`k',1] = e(q)
	matrix sig[`k',1] = e(sig)

matrix list q	
matrix list sig

Unfortunately, pwcorr appears to overwrite the useful xy covariance with
yy covariance (1.00, naturally), and does not leave behind the
significance value at all. Can something like what I sketch above be
done, or do I have to build a succinct_pwcorr() function from the ground

Thank you!


*   For searches and help try:

© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index