Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: capturing correlation estimates and standard errors into a matrix


From   "Sandu Cojocaru" <[email protected]>
To   [email protected]
Subject   st: capturing correlation estimates and standard errors into a matrix
Date   Sun, 19 Oct 2008 15:11:33 -0400

Dear statalist:

I would like to run correlations for a number of variables for an
analysis of twins as follows:

foreach v of varlist varlistname {
    bootstrap r(rho), reps(100) seed(1): correlate twin1`v' twin2`v'
}

Is there a way to capture the estimated correlation coefficients and
the bootstrapped standard errors that the above loop produces into a
matrix, so that I can then format these results into a table by using,
for instance, estout? T

he table would look like this:

                    Column title
var1               corr_coef
                     (st.error)
var2               corr coef
                     (st.error)

...and so on for all variables in varlist.

cheers,
sandu
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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