Hello to everybody:
I'm using SPSS 21 to test a hypothesis about a population proportion. For that I use the binomial test, with the following syntax: DATA LIST FREE / ite_24 peso. BEGIN DATA 1 31 0 94 END DATA. WEIGHT BY peso. NPTESTS /ONESAMPLE TEST (ite_24) BINOMIAL(TESTVALUE=0.35 SUCCESSCATEGORICAL=LIST(1) SUCCESSCONTINUOUS=CUTPOINT(MIDPOINT)) /MISSING SCOPE=ANALYSIS USERMISSING=EXCLUDE /CRITERIA ALPHA=0.01 CILEVEL=99. I understand that SPSS does a Z test approximation when n >= 25. What I don’t understand (and haven’t found any reference), is why this Z test uses some kind of Yates continuity correction, because it adds and subtracts 0.5 to the quantity of observed 1 categories and calculates two Z, reporting the smallest. For hand calculations I use te following algorithm, which gave me a significant one tailed result at .01 Z = (p – P) / SQRT(P * (1 – P) / n) P: population proportion p : sample proportion n : sample size SPSS gave me at .01 a non-significant result. Any suggestions? Kindly Andres ===================== 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 |
Administrator
|
Perhaps you'll find the good old (and now deprecated) NPAR TESTS command more to your liking. It gives an exact one-tailed p-value of .009 for your data. (And it does not conjure up any of that model viewer output!)
NPAR TESTS /BINOMIAL (0.35)=ite_24 /MISSING ANALYSIS. In the GUI, Analyze > Nonparametric > Legacy Dialogs > Binomial. HTH.
--
Bruce Weaver bweaver@lakeheadu.ca http://sites.google.com/a/lakeheadu.ca/bweaver/ "When all else fails, RTFM." PLEASE NOTE THE FOLLOWING: 1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above. 2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/). |
The NPAR dialogs are now show under the
Legacy submenu, but I am not aware of any place where they are declared
to be deprecated.
Jon Peck (no "h") aka Kim Senior Software Engineer, IBM [hidden email] phone: 720-342-5621 From: Bruce Weaver <[hidden email]> To: [hidden email], Date: 06/11/2013 11:53 AM Subject: Re: [SPSSX-L] One sample binomial test about a population proportion Sent by: "SPSSX(r) Discussion" <[hidden email]> Perhaps you'll find the good old (and now deprecated) NPAR TESTS command more to your liking. It gives an exact one-tailed p-value of .009 for your data. (And it does not conjure up any of that model viewer output!) NPAR TESTS /BINOMIAL (0.35)=ite_24 /MISSING ANALYSIS. In the GUI, Analyze > Nonparametric > Legacy Dialogs > Binomial. HTH. ANDRES ALBERTO BURGA LEON wrote > Hello to everybody: > > I'm using SPSS 21 to test a hypothesis about a population proportion. For > that I use the binomial test, with the following syntax: > > DATA LIST FREE > / ite_24 peso. > BEGIN DATA > 1 31 > 0 94 > END DATA. > > WEIGHT BY peso. > > NPTESTS > /ONESAMPLE TEST (ite_24) BINOMIAL(TESTVALUE=0.35 > SUCCESSCATEGORICAL=LIST(1) > SUCCESSCONTINUOUS=CUTPOINT(MIDPOINT)) > /MISSING SCOPE=ANALYSIS USERMISSING=EXCLUDE > /CRITERIA ALPHA=0.01 CILEVEL=99. > > I understand that SPSS does a Z test approximation when n >= 25. What I > don’t understand (and haven’t found any reference), is why > this Z test uses some kind of Yates continuity correction, because it adds > and subtracts 0.5 to the quantity of observed 1 categories and calculates > two Z, reporting the smallest. > > For hand calculations I use te following algorithm, which gave me a > significant one tailed result at .01 > > Z = (p – P) / SQRT(P * (1 – P) / n) > > P: population proportion > > p : sample proportion > > n : sample size > > SPSS gave me at .01 a non-significant result. > > Any suggestions? > > Kindly > > Andres > > ===================== > 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. -- View this message in context: http://spssx-discussion.1045642.n5.nabble.com/One-sample-binomial-test-about-a-population-proportion-tp5720671p5720672.html Sent from the SPSSX Discussion mailing list archive at 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 |
Administrator
|
My apologies. Too strong a word. However, it does seem to me that use of NPAR TESTS is discouraged. (You might prefer to say it the other way around -- i.e., use of NPTESTS is encouraged.)
--
Bruce Weaver bweaver@lakeheadu.ca http://sites.google.com/a/lakeheadu.ca/bweaver/ "When all else fails, RTFM." PLEASE NOTE THE FOLLOWING: 1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above. 2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/). |
In reply to this post by Bruce Weaver
Thank you, I 've allready done this, but I'm still trying to figure out why the NPTESTS uses the mentioned algorithm
Andres -----"SPSSX(r) Discussion" <[hidden email]> escribió: ----- Para: [hidden email] |
Hi Andres, Am I right in thinking you want to know what & why Yate’s correction is used? If so (and only as far as I understand it), its because the distribution of the squared normal deviate (chi-squared) assumes the measures are from a continuous
variable. That is, the scores could take on any value. If they can’t – as with counts – then the calculated value of chi-square is too high. Yate’s correction improves the accuracy of the estimate. Your algorithm uses the probabilities, so assumes a continuous
variable (the p value). This will give inflated type 1 errors (rejecting the null hypothesis when you shouldn’t).
I’m afraid I don’t know of a good reference for the details of the argument (i.e. the proof that using (deviation-0.5) is the best one to use), but a little
thought on the impact of squaring the normalised deviations [Poisson approximation is (observed-expected)^2/expected] when your values are rounded to integer values gives you the general idea. Mike From: SPSSX(r) Discussion [mailto:[hidden email]]
On Behalf Of ANDRES ALBERTO BURGA LEON Thank you, I 've allready done this, but I'm still trying to figure out why the
NPTESTS uses the mentioned algorithm Andres
======= 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
|
"Yates's correction" is the name of the continuity correction for the 2x2 table.
This one-sample correction-for-continuity does not have any special name that I know of. I presume that it is validated by improvements in accuracy, given by Monte Carlo studies. I don't remember hearing that it has ever been controversial, but I wonder whether the NPAR-tests does use an "exact" estimate, based on permutations. Yates's correction, on the other hand, has had some controversy among high-powered statisticians. There are articles in the 1980s, in the "Journal of the Royal Statistical Society", discussing Fishers Exact Test vs 2x2 Pearson test. See Yates, et al. JRSS Series A (1984) 147:426-463. Shuster. JRSS Series A (1985) 148:317-327. Upton. JRSS Series A (1992) 155:395-402. Everyone agreed that the FET "assumes fixed marginals" and is appropriate for that case. Everyone agreed that Yates's correction gives 2x2 p-values that agree more closely to the FET than the uncorrected test. The controversy was whether p-values from the FET were preferable when marginal totals are not fixed. The articles are worth reading for their close arguments on the meaning of "p" and philosophy of what is "preferable." In the 1984 article, Upton leant strongly against using Fishers' test. In the 1992 article, he announces own conversion, crediting the arguments of Barnard. -- Rich Ulrich Date: Wed, 12 Jun 2013 08:49:39 +0000 From: [hidden email] Subject: Re: One sample binomial test about a population proportion To: [hidden email]
Hi Andres,
Am I right in thinking you want to know what & why Yate’s correction is used?
If so (and only as far as I understand it), its because the distribution of the squared normal deviate (chi-squared) assumes the measures are from a continuous variable. That is, the scores could take on any value. If they can’t – as with counts – then the calculated value of chi-square is too high. Yate’s correction improves the accuracy of the estimate. Your algorithm uses the probabilities, so assumes a continuous variable (the p value). This will give inflated type 1 errors (rejecting the null hypothesis when you shouldn’t).
I’m afraid I don’t know of a good reference for the details of the argument (i.e. the proof that using (deviation-0.5) is the best one to use), but a little thought on the impact of squaring the normalised deviations [Poisson approximation is (observed-expected)^2/expected] when your values are rounded to integer values gives you the general idea.
Mike
From: SPSSX(r) Discussion [mailto:[hidden email]]
On Behalf Of ANDRES ALBERTO BURGA LEON
Thank you, I 've allready done this, but I'm still trying to figure out why the NPTESTS uses the mentioned algorithm Andres
|
Administrator
|
Regarding Rich's discussion of 2x2 tables below, see also Ian Campbell's Statistics in Medicine article on the N-1 chi-square.
http://www.iancampbell.co.uk/twobytwo/twobytwo.htm Campbell's simulations show that when the marginal totals are not fixed, the N-1 chi-square works well for expected counts as low as 1, IIRC.
--
Bruce Weaver bweaver@lakeheadu.ca http://sites.google.com/a/lakeheadu.ca/bweaver/ "When all else fails, RTFM." PLEASE NOTE THE FOLLOWING: 1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above. 2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/). |
Free forum by Nabble | Edit this page |