Statalist


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

st: RE: Re: RE: RE: Pearson correlate returned values: corr vs. pwcorr


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: Re: RE: RE: Pearson correlate returned values: corr vs. pwcorr
Date   Thu, 11 Dec 2008 22:34:43 -0000

It's not easy and I didn't say it was. 

In fact -pwcorr- itself does not save results. What you see afterwards
is just by courtesy of the last -correlate- used. 

I didn't write -pwcorr- and a fortiori I am clearly not responsible for
it. Nor do I recollect any specific comment by StataCorp personnel
explaining quite why it is set up the way it is. But some guesses seem
easy. 

Crudely, there is a tension between 

1. -pwcorr- as something a lot of users want -- at least practically as
possibly being the best way to make a good job out of analysing messy
data with variable incidence of missing values.

And 

2. -pwcorr- as a tool that produces by kludge and fudge a correlation
matrix of variable origins, a mongrel for which no two correlations are
necessarily based on the same observations and sample size, and a matrix
quite likely to fail to possess the basic properties of a correlation
matrix. 

If StataCorp did what some users probably want -- emit matrices of
results from -pwcorr- -- then there would then be, sooner or later,
cries of anguish when users found that the matrices concerned gave weird
multivariate results, and cries of deprecation when users of other
software or reviewers of papers or grant results heard, directly or
indirectly, that Stata did that.  

Of course, users sometimes rush in where StataCorp fears to tread. I
find that my -makematrix- from SSC lets you produce matrices -listwise-
(same thing). I regret doing that now, but I am not going to unravel it.


Nick 
[email protected] 

Martin Weiss

If it is easy to calculate the p-value from the returned values of
-pwcorr-, 
make sure you let me know how.

And: The question is not whether Stata should provide the p-value. That 
question was settled by StataCorp by providing the -sig- option. The 
question is: Given that we have the -sig- option, should the p-value not
be in the returned values...

Nick Cox

> It doesn't seem weird to me.
>
> It's quite common in Stata that P-values are not returned results,
> especially whenever they are directly deducible from other returned
> results.
>
> Also, in at least some problems there can be much argument about how
to
> best to calculate P-values, or indeed whether any such are reliable at
> all, so that discretion on the part of StataCorp is the better part of
> revelation.
>
> Remember, for every Stata user who may want to push beyond charted
> territory there is another Stata user who doesn't want Stata to
support
> dubious statistics.
>
> My -corrci- from Stata Journal supports confidence intervals, which
here
> as usually elsewhere I hold to be as or more useful than P-values. But
I
> draw the line at supporting pairwise stuff, as a matter of personal
> taste.
>
> The accompanying article spells out pertinent caveats. Inferences for
> correlations are at best messier than many people want to believe.
>
> SJ-8-3  pr0041  .  Speaking Stata: Corr. with confidence, Fisher's z
> revisited
>        (help corrci, corrcii if installed) . . . . . . . . . . . .  N.
> J. Cox
>        Q3/08   SJ 8(3):413--439
>        reviews Fisher's z transformation and its inverse, the
>        hyperbolic tangent, and reviews their use in inference
>        with correlations

Martin Weiss

> Official Stata does not seem to provide this functionality (which is a
> little weird). -h pwcorr- seems to acknowledge the problem with the
> returned
> values towards the end.
>
> So a hack seems possible, from what I observe when I set the -trace-
on.
> This FAQ points to another approach:
> http://www.stata.com/support/faqs/stat/survey.html

Grealy, Patrick J

> I would like to have the coefficient and significance available as
> returned values but both _corr_ and _pwcorr_ seem to come up short. I
> can get the coeff returned by _corr_ but not sig. I can get coeff and
> sig displayed by pwcorr but not returned as values for programming.
> Reluctantly, I am tempted to hack my local version of _pwcorr_ . Is
> there an easier way?
>
> Here is a simple demo:
> sysuse auto, clear
> pwcorr headroom turn, sig
> return list
> corr headroom turn
> return list

*
*   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