Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

RE: st: nokey for spearman


From   "Lachenbruch, Peter" <Peter.Lachenbruch@oregonstate.edu>
To   "'statalist@hsphsun2.harvard.edu'" <statalist@hsphsun2.harvard.edu>
Subject   RE: st: nokey for spearman
Date   Mon, 9 May 2011 10:42:55 -0700

Sob!  When I did this I got no output, just the headers from the display.  How do I retrieve the matrix?

Tony

Peter A. Lachenbruch
Department of Public Health
Oregon State University
Corvallis, OR 97330
Phone: 541-737-3832
FAX: 541-737-4001


-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Nick Cox
Sent: Monday, May 09, 2011 10:37 AM
To: 'statalist@hsphsun2.harvard.edu'
Subject: RE: st: nokey for spearman

-quietly- needs to be applied to your second -spearman- command. 

Nick 
n.j.cox@durham.ac.uk 

Lachenbruch, Peter

Thanks but it didn't work.  Here is a fragment of output and code
It looks like qui is ignored by Stata -
Good thought though

. foreach v of varlist swlsc1 dzactvas skinactp cmasxt dzactpt totalvas proximal finc
> haq ckp aldp extramusc_global extramusc_globale{
  2. disp _newline "variable is " "`v'"
  3. qui spearman  `v' voicesc1 if group==1,mat stats(rho obs p)
  4. disp _newline "diadocho etc. present"
  5. spearman `v' diadocho Artic voice_quality if group==1 & diadocho<.,stats (rho ob
> s p) 
  6. }

variable is swlsc1

diadocho etc. present

+-----------------+
|  Key            |
|-----------------|
|   rho           |
|   Number of obs |
|   Sig. level    |
+-----------------+

             |   swlsc1 diadocho    Artic voice_~y
-------------+------------------------------------
      swlsc1 |   1.0000 
             |       27 
             | 
             |
    diadocho |   0.3283   1.0000 
             |       27       27 
             |   0.0946 
             |
       Artic |   0.1605   0.0331   1.0000 
             |       27       27       27 
             |   0.4239   0.8697 
             |
voice_qual~y |   0.3685   0.2296   0.1424   1.0000 
             |       27       27       27       27 
             |   0.0586   0.2493   0.4787 
             |

variable is dzactvas

diadocho etc. present

+-----------------+
|  Key            |
|-----------------|
|   rho           |
|   Number of obs |
|   Sig. level    |
+-----------------+

             | dzactvas diadocho    Artic voice_~y
-------------+------------------------------------
    dzactvas |   1.0000 
             |       27 
             | 
             |
    diadocho |   0.1774   1.0000 
             |       27       27 
             |   0.3761 
             |
       Artic |   0.2264   0.0331   1.0000 
             |       27       27       27 
             |   0.2562   0.8697 
             |
voice_qual~y |   0.0258   0.2296   0.1424   1.0000 
             |       27       27       27       27 
             |   0.8982   0.2493   0.4787 
             |

variable is skinactp

diadocho etc. present

+-----------------+
|  Key            |
|-----------------|
|   rho           |
|   Number of obs |
|   Sig. level    |
+-----------------+


Maarten Buis

On Mon, May 9, 2011 at 6:50 PM, Lachenbruch, Peter wrote:
> I am doing a lot of spearman correlations with multiple responses and get a  key before each matrix output.  When I do something like this when using the tab command I can suppress the key with the nokey option.  It doesn't work for spearman.

What about the following trick:

sysuse auto, clear
qui  spearman mpg rep78 turn displacement
matlist r(Rho) , format(%9.3f)

So we suppress all output from -spearman- and let -matlist- display
the returned "correlation" table.


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