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]

From |
Carsten Sauer <carsten.sauer@uni-bielefeld.de> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: How to export Mann-Whitney U Test output in rich text format |

Date |
Sat, 01 Sep 2012 18:20:27 +0200 |

Hi Caliph,

Example: webuse fuel2 ranksum mpg, by(treat) ret li estadd scalar N_2 = r(N_2) eret li Best, Carsten Am 01.09.2012 16:56, schrieb Caliph Omar Moumin:

Thank you NickI never programmed and it seems complicated than i thought.Kind Regards, Caliph Email: sheikmoumin@yahoo.com ----- Original Message ----- From: Nick Cox <njcoxstata@gmail.com> To: statalist@hsphsun2.harvard.edu Cc: Sent: Saturday, September 1, 2012 3:52 PM Subject: Re: st: How to export Mann-Whitney U Test output in rich text format 0. Read the chapters on [U] on programming until you understand enough to get your program working correctly. 1. Your program will allow syntax like the r-class command, but will be declared as e-class. 2. Your program will run the r-class command. 3. Your program will pick up the r-class results you want and return them as e-class results. Here is a toy example: program mymean, eclass version 9 syntax varname(numeric) [if] [in] marksample touse qui count if `touse' su `varlist' if `touse', meanonly ereturn scalar mean = r(mean) end If you have never programmed in Stata before, expect this to take several hours. Naturally, it might be easier to work out how to format results you save otherwise within your word processing software (at a guess, MS Word). Nick Nick On Sat, Sep 1, 2012 at 2:23 PM, Caliph Omar Moumin <sheikmoumin@yahoo.com> wrote:Dear Billy How can write my own eclass verssion? I ready need to export the results of ranksum command in rtf like regression results. Kind Regards, Caliph Email: sheikmoumin@yahoo.com ----- Original Message ----- From: William Buchanan <william@williambuchanan.net> To: "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu> Cc: Sent: Saturday, September 1, 2012 2:28 PM Subject: Re: st: How to export Mann-Whitney U Test output in rich text format You could always write "your own" eclass version of the program. I've had to do this for folks before and I just ended up posting the results from -r()- into -e()- with the same name. Then esttab/estout works fine. HTH, Billy Sent from my iPhone On Sep 1, 2012, at 5:09, Nick Cox <njcoxstata@gmail.com> wrote:-eststo- and -estpost- are user-written commands (SJ, SSC), as you are asked to explain. You don't show the code you tried using -eststo- or -estpost- (or I gather other commands) but as -ranksum- is not an estimation command, I don't think you should expect your code to work. The difference between e-class and r-class commands is crucial here. Others may have positive suggestions. Nick On Sat, Sep 1, 2012 at 12:35 PM, Caliph Omar Moumin <sheikmoumin@yahoo.com> wrote:I am having a problem of how to export Mann-Whitney U Test output into rich text format "rtf" I tried to combine command like "eststo" "estpost" and the other but it is not working. my command is listed below, what command shall i combine to export outputs including obs; rank sum; expected; z and others statistics. If you know how could you please help me? forval i = 1/8 { display "*================================================*" display "`: label (tilstand4) `i''" _n display "*================================================*" bysort gender: ranksum LOS if (tilstand4 == `i'), by(alcoholcons) } Two-sample Wilcoxon rank-sum (Mann-Whitney) test alcoholcons | obs rank sum expected -------------+--------------------------------- nonalcohol | 5071 14440834 14695758 alcohol | 724 2353076 2098152 -------------+--------------------------------- combined | 5795 16793910 16793910 unadjusted variance 1.773e+09 adjustment for ties -2.667e+08 ---------- adjusted variance 1.507e+09 Ho: LOS(alcoho~s==nonalcohol) = LOS(alcoho~s==alcohol) z = -6.568 Prob > |z| = 0.0000* * 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/ * * 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/ * * 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/

-- Carsten Sauer SFB 882 "Von Heterogenitäten zu Ungleichheiten" Teilprojekt A6 "Die Legitimation von Ungleichheiten - Strukturelle Bedingungen von Gerechtigkeitseinstellungen" Fakultät für Soziologie Universität Bielefeld Postfach 10 01 31 33501 Bielefeld Tel.: 0521 106-70056/-6948 (Sekr. Frau Fischer) Fax: 0521 106-6479 * * 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: How to export Mann-Whitney U Test output in rich text format***From:*Caliph Omar Moumin <sheikmoumin@yahoo.com>

**Re: st: How to export Mann-Whitney U Test output in rich text format***From:*Nick Cox <njcoxstata@gmail.com>

**Re: st: How to export Mann-Whitney U Test output in rich text format***From:*William Buchanan <william@williambuchanan.net>

**Re: st: How to export Mann-Whitney U Test output in rich text format***From:*Caliph Omar Moumin <sheikmoumin@yahoo.com>

**Re: st: How to export Mann-Whitney U Test output in rich text format***From:*Nick Cox <njcoxstata@gmail.com>

**Re: st: How to export Mann-Whitney U Test output in rich text format***From:*Caliph Omar Moumin <sheikmoumin@yahoo.com>

- Prev by Date:
**Re: st: problems with installing the quaids command** - Next by Date:
**Re: st: RE: Mean test in a Likert Scale** - Previous by thread:
**Re: st: How to export Mann-Whitney U Test output in rich text format** - Next by thread:
**st: Sum variable over all countries excluding observations from nth country** - Index(es):