Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Richard Williams <richardwilliams.ndu@gmail.com> |
To | statalist@hsphsun2.harvard.edu |
Subject | Re: st: Table of partial correlation coefficients |
Date | Fri, 11 Mar 2011 11:31:27 -0500 |
At 10:38 AM 3/11/2011, Charles Koss wrote:
Richard, thank you for following up. Based on your code, I would like to summarize the results from pcorr. Let's say I run: webuse auto pcorr price mpg trunk weight length pcorr mpg price trunk weight length pcorr trunk price mpg weight length pcorr weight price mpg trunk length pcorr length price mpg trunk weight Then, I would like to make a summary of the results from the previous 5 lines of code. I know I can copy & paste but imagine how easy would it be to obtain a table resembling the corr command output.
OK, so by one variable, you meant one dependent variable. How about something like this? You'll need to get estadd and esttab from SSC first.
webuse auto, clear reg price mpg trunk weight length estadd pcorr est store m1 reg mpg price trunk weight length estadd pcorr est store m2 reg trunk price mpg weight length estadd pcorr est store m3 reg weight price mpg trunk length estadd pcorr est store m4 reg length price mpg trunk weight estadd pcorr est store m5 esttab m1 m2 m3 m4 m5, main(pcorr) not noconstant nostar The output from the last command is . esttab m1 m2 m3 m4 m5, main(pcorr) not noconstant nostar ----------------------------------------------------------------------------- (1) (2) (3) (4) (5) price mpg trunk weight length ----------------------------------------------------------------------------- mpg -0.122 -0.0240 -0.202 -0.174 trunk 0.0317 -0.0240 -0.0797 0.363 weight 0.409 -0.202 -0.0797 0.830 length -0.292 -0.174 0.363 0.830 price -0.122 0.0317 0.409 -0.292 ----------------------------------------------------------------------------- N 74 74 74 74 74 ----------------------------------------------------------------------------- pcorr coefficients ------------------------------------------- Richard Williams, Notre Dame Dept of Sociology OFFICE: (574)631-6668, (574)631-6463 HOME: (574)289-5227 EMAIL: Richard.A.Williams.5@ND.Edu WWW: http://www.nd.edu/~rwilliam * * 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/