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/