Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: P-value not saved after -corr-?


From   "Michael Lemay" <[email protected]>
To   <[email protected]>
Subject   st: P-value not saved after -corr-?
Date   Thu, 27 Sep 2007 16:13:45 -0400

I created this dataset of correlations using the following syntax:

foreach x in multi lit alarmr interr secr porchr signr bganyr gphysr
betph vand {
quietly: corr `x' i_ok if (country==11 | country==18 | country==19)
local all "`r(rho)'"
quietly: corr `x' i_ok if country==11
local gr "`r(rho)'"
quietly: corr `x' i_ok if country==18
local pt "`r(rho)'"
quietly: corr `x' i_ok if country==19
local pl "`r(rho)'"
post asa_corrtab ("`x'") (`all') (`gr') (`pt') (`pl')
}

It works fine for my purpose except that I would like to add the
p-value for each correlations to the dataset.  I thought it would be
fairly easy to do.  However, -corr- does not save the p-value, unlike
other commands such as -tab-.  How would I go about accessing the
p-value with -corr-?

Thank you

Michael
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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