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

From |
"Martin Weiss" <martin.weiss1@gmx.de> |

To |
<statalist@hsphsun2.harvard.edu> |

Subject |
st: AW: AW: combined Pearson and Spearman (listwise ) + LATEX |

Date |
Tue, 19 May 2009 14:17:38 +0200 |

<> I have never tried anything remotely similar to what you are asking for, but I do know that Ben Jann has -ssc d estout- out there, and that there is a routine called -estpost correlate- in there that attaches stars for the significance level of correlation coefficients... Sorry I cannot be more helpful... HTH Martin -----Ursprüngliche Nachricht----- Von: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Katja Schulze Gesendet: Dienstag, 19. Mai 2009 11:22 An: statalist@hsphsun2.harvard.edu Betreff: st: AW: combined Pearson and Spearman (listwise ) + LATEX Thank you, Martin! You got it, I've got Vista. But now it works perfectly fine after having updated to 10.1. Do you also know how to add p-values (best in parantheses) below each correlation coefficient? I could imagine qui spearman `varlist', pw stats(rho p) could help, but how do I combine the rho-/ and p-matrices? And I do not find an option for corr similar to the "sig"-option of pwcorr. Thanks in advance again for your great help! Katja <> BTW, the only thing that needs to change from Rene`s code is that you replace -version 10.1- by -version 10-, just in case you do not manage to update. -outtable- happily takes a -format()- option as witnessed in its help file... HTH Martin -----Ursprüngliche Nachricht----- Von: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Katja Schulze Gesendet: Montag, 18. Mai 2009 20:26 An: statalist@hsphsun2.harvard.edu Betreff: st: combined Pearson and Spearman (listwise ) + LATEX Dear all, I would like to create LISTWISE Pearson and Spearman Correlations in a single matrix (similar to René, see below) and put this into LATEX. My problem is, that I only have Stata 10 version, and cannot update to Stata 10.1 (It returns the error: cannot write in directory C:\Program Files\Stata10\ado\updates\). So is there a program command similar to the one below for Stata 10? And I would like to display the p-value in parantheses below. And all numbers should have only three decimals. Thanx a lot for your help!!! This would be great! Best, Katja < > René said Is there a way to do pairwise Pearson AND Spearman Correlations in a single matrix, such as Pearson in the lower left and Spearman in the upper right traingle of the matrix? Provided, that is even possible. Is there a nice way to ouput such a correlation matrix to LaTeX? The following requires -outtable- from SSC (ssc install outtable) ------------------- capt prog drop corrmat *! corrmat CFB 2008dec09 prog corrmat version 10.1 syntax varlist(numeric) using/ qui spearman `varlist', pw tempname c mat `c' = r(Rho) local k: word count `varlist' forv i = 2/`k' { local f: word `i' of `varlist' forv j = 1/`=`i'-1' { local s: word `j' of `varlist' qui corr `f' `s' mat `c'[`i', `j'] = r(rho) } } outtable using `using', mat(`c') replace format(%9.4f) di _n "Spearman/Pearson correlations written to `using'.tex" _n end -------------------- __________________________________________________________________________ Verschicken Sie SMS direkt vom Postfach aus - in alle deutschen und viele ausländische Netze zum gleichen Preis! https://produkte.web.de/webde_sms/sms * * 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/

**References**:**st: AW: combined Pearson and Spearman (listwise ) + LATEX***From:*Katja Schulze <katjou@web.de>

- Prev by Date:
**st: AW: combined Pearson and Spearman (listwise ) + LATEX** - Next by Date:
**st: RE: AW: combined Pearson and Spearman (listwise ) + LATEX** - Previous by thread:
**st: AW: combined Pearson and Spearman (listwise ) + LATEX** - Next by thread:
**st: RE: AW: combined Pearson and Spearman (listwise ) + LATEX** - Index(es):

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