Posted by
Salbod on
Apr 13, 2018; 10:21pm
URL: http://spssx-discussion.165.s1.nabble.com/Mann-Whitney-U-question-tp5735899p5735911.html
Hi Bruce, now I'm thinking about it. Thank you for the link. -Steve
-----Original Message-----
From: SPSSX(r) Discussion <
[hidden email]> On Behalf Of Bruce Weaver
Sent: Friday, April 13, 2018 6:09 PM
To:
[hidden email]
Subject: Re: Mann-Whitney U question
I wondered if Stephen was thinking about a CI for the parameter that RonĂ¡n Conroy describes in his Stata Journal article on the Mann-Whitney U test--i.e., the probability that a randomly drawn X is greater than a randomly drawn Y. Stata's -ranksum- command has an option (porder) to estimate that parameter, but does not report a CI for it. I am not aware of any direct & easy way to compute that parameter or a CI for it using SPSS.
https://www.stata-journal.com/sjpdf.html?articlenum=st0253Jon Peck wrote
> Probably, the ci I pointed out is not what you want as it pertains to
> the Monte Carlo distribution. If you use the R approach, here is a
> gentler way to do this in Statistics.
>
> First, install the coin package (one time). This will prompt you for
> a location. Choose some US location from the list that appears.
>
> begin program r.
> install.packages("coin")
> end program.
>
> To run the test and get a ci for the shift in the distributions, first
> make sure that the group variable measurement level is set to nominal
> or ordinal. Then run this code (using Bruce's data).
>
> begin program r.
> library(coin)
> data= spssdata.GetDataFromSPSS(factorMode="levels")
> wilcox_test(Score~Farm, data=data, conf.int=TRUE,
> distribution="exact") end program.
>
>
> On Fri, Apr 13, 2018 at 9:21 AM, Thomas MacFarland <
> tommac@
> > wrote:
>
>> Greetings:
>>
>>
>>
>> You can also use R to easily obtain the desired statistics:
>>
>>
>>
>> *install.packages**("coin")*
>>
>> *library(coin) # Load the coin package.*
>>
>> *help(package=coin) # Show the information page.*
>>
>> *sessionInfo**() # Confirm all attached packages.*
>>
>> *# Select the most local mirror site using Set CRAN mirror.*
>>
>>
>>
>> *coin::wilcox_test(Judgment ~ Treatment.recode,*
>>
>> * data = Goats.df,*
>>
>> * distribution = "exact", conf.int <
http://conf.int> = TRUE)*
>>
>> * # Note the use of ~ between the two object variables*
>>
>>
>>
>> Look at
https://www.springer.com/us/book/9783319306339 and more
>> specifically the chapter on Mann-Whitney for more detail if the above
>> syntax is not sufficient.
>>
>>
>>
>> BTW, the Goats.df dataset is available as a free download. Just
>> click on *ESM files
>> <
http://www.springer.com/cda/content/document/cda_downloaddocument>> /MacFarland.zip?SGWID=0-0-45-1578079-p179875955>*
>> and
>> then select Chapter 4 when the file(s) open.
>>
>>
>>
>> Best wishes.
>>
>>
>>
>> Tom MacFarland
>>
>> ----------
>>
>> Thomas W. MacFarland, Ed.D.
>>
>> Senior Research Associate; Institutional Effectiveness and Associate
>> Professor
>>
>> Nova Southeastern University
>>
>> Voice 954-262-5395
> tommac@
>>
>>
>>
>> *From:* SPSSX(r) Discussion <
> SPSSX-L@.UGA
> > *On Behalf Of *Dates,
>> Brian
>> *Sent:* Friday, April 13, 2018 11:05 AM
>>
>> *To:*
> SPSSX-L@.UGA
>> *Subject:* Re: Mann-Whitney U question
>>
>>
>>
>> If you want the actual confidence interval of the median, and not for
>> the p-value, you can use Analyze>Descriptives>Ratio. Using Bruce's
>> data compute a third variable, e.g., denom, to use as the denominator
>> for the ratio test. Use compute denom=1 . Then either run the
>> analysis from the GUI or the syntax below.
>>
>>
>>
>> RATIO STATISTICS Score WITH denom BY Farm (ASCENDING)
>> /MISSING=EXCLUDE
>> /PRINT=CIN(95) COD MDCOV MEAN MEDIAN PRD.
>>
>>
>>
>> You'll get medians and confidence intervals for both groups and for
>> the overall score. Because it's based on ranks, you'll need to round
>> to the closest rank to get the 95% CI, or in the case of medians the
>> approximate 95% CI.
>>
>>
>>
>> Brian
>> ------------------------------
>>
>> *From:* SPSSX(r) Discussion <
> SPSSX-L@.UGA
> > on behalf of Bruce
>> Weaver <
> bruce.weaver@
> >
>> *Sent:* Friday, April 13, 2018 10:13:14 AM
>> *To:*
> SPSSX-L@.UGA
>> *Subject:* Re: Mann-Whitney U question
>>
>>
>>
>> I've pasted code for an example below. What Jon has suggested gives
>> a CI for the p-value. Is that what you were asking for Stephen?
>>
>>
>> * Example from
>>
https://www.statsdirect.co.uk/help/nonparametric_methods/mann_whitney>> .htm
>> <
https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2F>> www.statsdirect.co.uk%2Fhelp%2Fnonparametric_methods%2Fmann_whitney.h
>> tm&data=02%7C01%7Ctommac%40NOVA.EDU%7Cc2704a58bc8a4182f21308d5a14
>> ffeb4%7C2c2b2d312e3e4df1b571fb37c042ff1b%7C0%7C1%7C636592287329755772
>> &sdata=m4pkwBagQXjiTkGN5YbRRSCh3vNAeHMhGzvYF6QJEaA%3D&reserve
>> d=0>
>> .
>> NEW FILE.
>> DATASET CLOSE ALL.
>> DATA LIST LIST / Farm(F1) Score(F5.1).
>> BEGIN DATA
>> 1 14.8
>> 1 7.3
>> 1 5.6
>> 1 6.3
>> 1 9.0
>> 1 4.2
>> 1 10.6
>> 1 12.5
>> 1 12.9
>> 1 16.1
>> 1 11.4
>> 1 2.7
>> 0 12.7
>> 0 14.2
>> 0 12.6
>> 0 2.1
>> 0 17.7
>> 0 11.8
>> 0 16.9
>> 0 7.9
>> 0 16.0
>> 0 10.6
>> 0 5.6
>> 0 5.6
>> 0 7.6
>> 0 11.3
>> 0 8.3
>> 0 6.7
>> 0 3.6
>> 0 1.0
>> 0 2.4
>> 0 6.4
>> 0 9.1
>> 0 6.7
>> 0 18.6
>> 0 3.2
>> 0 6.2
>> 0 6.1
>> 0 15.3
>> 0 10.6
>> 0 1.8
>> 0 5.9
>> 0 9.9
>> 0 10.6
>> 0 14.8
>> 0 5.0
>> 0 2.6
>> 0 4.0
>> END DATA.
>>
>> NPAR TESTS
>> /M-W= Score BY Farm(0 1)
>> /METHOD= MC CIN(95) SAMPLES(10000).
>>
>> From the output table:
>>
>> Mann-Whitney U: 189.000
>> Wilcoxon W: 855.000
>>
>> z = -.643, p = .520
>> Monte Carlo two-tailed p = .513, 95% CI .503 to .523 Monte Carlo
>> one-tailed p = .253, 95% CI .245 to .262
>>
>>
>>
>> Jon Peck wrote
>> > If you have the Exact Tests option, you can use the legacy
>> > procedure to get a CI for Mann-Whitney with syntax like this, which
>> > uses a Monte Carlo method. This is supported in the Legacy dialog
>> > box.
>> >
>> > NPAR TESTS
>> > /M-W= educ BY minority(0 1)
>> > /METHOD= MC CIN(95) SAMPLES(10000).
>> >
>> > Without Exact Tests, you can use the asymptotic standard error and
>> appeal
>> > to asymptotic normality.
>> >
>> >
>> >
>> > On Thu, Apr 12, 2018 at 6:31 PM, Salbod <
>>
>> > ssalbod@
>>
>> > > wrote:
>> >
>> >> Dear Friend,
>> >>
>> >> Is there anyway, using SPSS, to generate Confidence Intervals for
>> >> the Mann-Whitney U test?
>> >>
>> >> Thank you.
>> >>
>> >> Stephen Salbod, Pace University, NYC
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> --
>> >> Sent from:
http://spssx-discussion.1045642.n5.nabble.com/>> <
https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fs>> pssx-discussion.1045642.n5.nabble.com%2F&data=02%7C01%7Ctommac%40
>> NOVA.EDU%7Cc2704a58bc8a4182f21308d5a14ffeb4%7C2c2b2d312e3e4df1b571fb3
>> 7c042ff1b%7C0%7C1%7C636592287329755772&sdata=x4oI%2B%2BOnsFDbdnWK
>> yU2RuPVzvH9GrH6SVCU9fW7uxZ4%3D&reserved=0>
>> >>
>> >> =====================
>> >> To manage your subscription to SPSSX-L, send a message to
>> >>
>>
>> > LISTSERV@.UGA
>>
>> > (not to SPSSX-L), with no body text except the
>> >> command. To leave the list, send the command SIGNOFF SPSSX-L For a
>> >> list of commands to manage subscriptions, send the command INFO
>> >> REFCARD
>> >>
>> >
>> >
>> >
>> > --
>> > Jon K Peck
>>
>> > jkpeck@
>>
>> >
>> > =====================
>> > To manage your subscription to SPSSX-L, send a message to
>>
>> > LISTSERV@.UGA
>>
>> > (not to SPSSX-L), with no body text except the command. To leave
>> > the list, send the command SIGNOFF SPSSX-L For a list of commands
>> > to manage subscriptions, send the command INFO REFCARD
>>
>>
>>
>>
>>
>> -----
>> --
>> Bruce Weaver
>>
> bweaver@
> LISTSERV@.UGA
> (not to SPSSX-L), with no body text except the
>> command. To leave the list, send the command SIGNOFF SPSSX-L For a
>> list of commands to manage subscriptions, send the command INFO
>> REFCARD
>>
>> ===================== To manage your subscription to SPSSX-L, send a
>> message to
> LISTSERV@.UGA
> (not to SPSSX-L), with no body text
>> except the command. To leave the list, send the command SIGNOFF
>> SPSSX-L For a list of commands to manage subscriptions, send the
>> command INFO REFCARD ===================== To manage your
>> subscription to SPSSX-L, send a message to
> LISTSERV@.UGA
> (not to SPSSX-L), with no body text
>> except the command. To leave the list, send the command SIGNOFF
>> SPSSX-L For a list of commands to manage subscriptions, send the
>> command INFO REFCARD
>>
>
>
>
> --
> Jon K Peck
> jkpeck@
>
> =====================
> To manage your subscription to SPSSX-L, send a message to
> LISTSERV@.UGA
> (not to SPSSX-L), with no body text except the command. To leave the
> list, send the command SIGNOFF SPSSX-L For a list of commands to
> manage subscriptions, send the command INFO REFCARD
-----
--
Bruce Weaver
[hidden email]
http://sites.google.com/a/lakeheadu.ca/bweaver/"When all else fails, RTFM."
NOTE: My Hotmail account is not monitored regularly.
To send me an e-mail, please use the address shown above.
--
Sent from:
http://spssx-discussion.1045642.n5.nabble.com/=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD