Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: RE: Compact list of correlation, by cross-section


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   RE: st: RE: Compact list of correlation, by cross-section
Date   Tue, 3 Aug 2004 20:54:51 +0100

One point only, as below. 

Nick 
[email protected] 

> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]]On Behalf Of Michael S.
> Hanson
> Sent: 03 August 2004 20:39
> To: [email protected]
> Subject: Re: st: RE: Compact list of correlation, by cross-section
> 
> 
> On Aug 3, 2004, at 12:53 PM, Nick Cox wrote:
> 
> > The condition "if idn == `i'" is not only illegal,
> > but in any case irrelevant to the -display-.
> > It should just be omitted. That is, the -correlate-
> > command already took care of the restriction
> > you want, and there is only one correlation
> > available to display, so no ambiguity.
> 
> 	Unfortunately, omitting the second "if" condition does 
> not produce 
> what I am looking for:  since there are t observations for 
> each id, t > 
> count(id) = 50, the first id is shown 50 times along with the 
> (otherwise correct) correlation coefficients.  Given the solutions 
> below, I'm not going to spend more time on this now....

I don't see the problem, either from this or from your 
original code. Any way, you must loop over distinct 
groups, _not_ observations. 

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



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index