Dear list, I have a depression variable with a cut-score of ( 0= less than 16) and (1=greater than 16), 38% of my sample falls into the "greater than 16" classification. I would like to generate a confidence interval. Can someone suggest syntax for how I can do this. All suggestions are welcomed, Stace |
Administrator
|
Bust out your stats book and look up the formula for the CI of a proportion.
Or look it up on the internet! Next look up the COMPUTE command in the FM! Give it a try and report back if you stumble! This question has been asked and answered in this group a number of times so perhaps search the archives?
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me. --- "Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis." Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?" |
Administrator
|
In reply to this post by stace swayne
Most textbooks will likely show the Wald method only. (That's the common "normal approximation" method.) But it has been argued by authors like Newcombe (1998) and Agresti & Coull (1998) that the Wilson score method gives a CI with much better properties. See below for an example of how to compute it. (I don't have SPSS on this machine, so cannot list the results in my post.) Here are the references for the articles mentioned above.
Agresti, A., & Coull, B. A. (1998). Approximate is better than “exact” for interval estimation of binomial proportions. The American Statistician, 52(2), 119-126. http://www.stat.ufl.edu/~aa/articles/agresti_coull_1998.pdf Newcombe, R. G. (1998). Two‐sided confidence intervals for the single proportion: comparison of seven methods. Statistics in medicine, 17(8), 857-872. http://onlinelibrary.wiley.com/doi/10.1002/%28SICI%291097-0258%2819980430%2917:8%3C857::AID-SIM777%3E3.0.CO;2-E/abstract DATA LIST LIST /x(f8.0) n(f8.0) confid(f5.3) . BEGIN DATA. 81 263 .95 15 148 .95 0 20 .95 1 29 .95 81 263 .90 15 148 .90 0 20 .90 1 29 .90 81 263 .99 15 148 .99 0 20 .99 1 29 .99 END DATA. * Wilson score method (Method 3 in Newcombe, 1998) . * Code adapted from Robert Newcombe's code posted here: http://archive.uwcm.ac.uk/uwcm/ms/Robert2.html . compute z = probit(1-(1-confid)/2). compute p = x/n. compute q = 1-p. COMPUTE #x1 = 2*n*p+z**2 . COMPUTE #x2 = z*(z**2+4n*n*p*(1-p))**0.5 . COMPUTE #x3 = 2*(n+z**2) . COMPUTE lower = (#x1 - #x2) / #x3 . COMPUTE upper = (#x1 + #x2) / #x3 . EXECUTE . FORMATS lower upper (f5.4). LIST x n p lower upper.
--
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 stace swayne
There are actually many different formulas
that can be used for proportion CIs - we found 16 when investigating this
several years ago.
The PROPOR extension command (Analyze > Descriptive Statistics > Proportion Confidence Intervals will do this from the aggregate counts. Binomial and Poisson CIs are provided, with the binomial intervals using the Jeffreys formula that is also used in error bar charts It requires the Python Essentials (available via the SPSS Community website or as part of your Statistics installation, depending on version) and is available in the Extension Commands collection. The SPSS Community website is at www.ibm.com/developerworks/spssdevcentral. Jon Peck (no "h") aka Kim Senior Software Engineer, IBM [hidden email] phone: 720-342-5621 From: stace swayne <[hidden email]> To: [hidden email], Date: 04/19/2014 08:30 AM Subject: [SPSSX-L] Question about generating Confidence Intervals Sent by: "SPSSX(r) Discussion" <[hidden email]> Dear list, I have a depression variable with a cut-score of ( 0= less than 16) and (1=greater than 16), 38% of my sample falls into the "greater than 16" classification. I would like to generate a confidence interval. Can someone suggest syntax for how I can do this. All suggestions are welcomed, Stace |
In reply to this post by David Marso
For some reason, there is a delay when certain posts make it to my mailbox (e.g., the original post has yet to arrive). Anyway, here's the response straight from the IBM website: Ryan On Sat, Apr 19, 2014 at 11:14 AM, David Marso <[hidden email]> wrote: Bust out your stats book and look up the formula for the CI of a proportion. |
Free forum by Nabble | Edit this page |