Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

Re: st: Table of partial correlation coefficients


From   Charles Koss <[email protected]>
To   [email protected]
Subject   Re: st: Table of partial correlation coefficients
Date   Fri, 11 Mar 2011 09:38:57 -0600

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.

Thanks,

Charles

-- 
Charles Koss

On Fri, Mar 11, 2011 at 9:05 AM, Richard Williams
<[email protected]> wrote:
> At 09:27 AM 3/11/2011, Charles Koss wrote:
>>
>> Dear list members:
>>
>> I want to do a table that summarizes the partial correlation
>> coefficients of a list of variables. Has someone programmed it before?
>> pcorr only gives you the coefficient for one variable.
>
> No, it gives you all of them.
>
> . webuse auto
> (1978 Automobile Data)
>
> . pcorr price  mpg trunk weight length
> (obs=74)
>
> Partial and semipartial correlations of price with
>
>               Partial   Semipartial      Partial   Semipartial
> Significance
>   Variable |    Corr.         Corr.      Corr.^2       Corr.^2
>  Value
> ------------+-----------------------------------------------------------------
>        mpg |  -0.1218       -0.0983       0.0148        0.0097
> 0.3117
>      trunk |   0.0317        0.0254       0.0010        0.0006
> 0.7928
>     weight |   0.4090        0.3591       0.1673        0.1290
> 0.0004
>     length |  -0.2918       -0.2444       0.0852        0.0598
> 0.0135
>
> What do you want instead?
>
>
> -------------------------------------------
> Richard Williams, Notre Dame Dept of Sociology
> OFFICE: (574)631-6668, (574)631-6463
> HOME:   (574)289-5227
> EMAIL:  [email protected]
> 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/
>

*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index