Find local businesses and services in your area with Yahoo!7 Local. Get started. |
|
I you have a proportion, p, of a sample of N,
the standard error of the proportion is SEP= Sq. root(p*(1-p)/N) The 95% confidence interval is the usual p +/- 1.96*SEP Easily found by Googling "confidence interval of a proportion" Gary ----- Original Message ----- From: "Jims More" <[hidden email]> To: [hidden email] Sent: Wednesday, August 19, 2009 7:44:14 PM GMT -06:00 US/Canada Central Subject: Confidence interval of proportion Dear all, � I want to construct a 95% confidence interval for� each� proportion of the categories of a variable.� For example, marital status with categories single, married, widowed/widower, and separated.� Given the collected data, is it possible to construct the 95% confidence interval of the proportion of single, married, widowed/widower, and separated? � Thank you for your help. � Jims Find local businesses and services in your area with Yahoo!7 Local. Get started . ===================== 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
|
In reply to this post by Jims More
Gary has given you the method that uses the normal approximation. But there are other methods that are arguably better. Robert Newcombe (University of Wales, Cardiff, I think) has done a lot of work looking at some of the other methods. Here is some syntax I wrote several years ago to compute a couple of them. www.angelfire.com/wv/bwhomedir/spss/ciprop.txt At the same time, I wrote some syntax to compute the Clopper-Pearson "exact" confidence interval, but note that some of the other methods usually have much better "coverage". www.angelfire.com/wv/bwhomedir/spss/clopper_pearson.txt
--
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/). |
|
When we investigated this question a few years ago, we came up with 16 ways of computing the ci's, if my memory is correct.
There is an extension command, PROPOR, that can be downloaded from Developer Central (www.spss.com/devcentral) that does just a few of these and is pretty flexible in the data structures it accepts. It requires at least v16 and the Python plugin, but no Python knowledge is required to use it. HTH, Jon Peck -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Bruce Weaver Sent: Wednesday, August 19, 2009 8:00 PM To: [hidden email] Subject: Re: [SPSSX-L] Confidence interval of proportion Jims More wrote: > > Dear all, > > I want to construct a 95% confidence interval for each proportion of the > categories of a variable. For example, marital status with categories > single, married, widowed/widower, and separated. Given the collected > data, is it possible to construct the 95% confidence interval of the > proportion of single, married, widowed/widower, and separated? > > Thank you for your help. > > Jims > Gary has given you the method that uses the normal approximation. But there are other methods that are arguably better. Robert Newcombe (University of Wales, Cardiff, I think) has done a lot of work looking at some of the other methods. Here is some syntax I wrote several years ago to compute a couple of them. www.angelfire.com/wv/bwhomedir/spss/ciprop.txt At the same time, I wrote some syntax to compute the Clopper-Pearson "exact" confidence interval, but note that some of the other methods usually have much better "coverage". www.angelfire.com/wv/bwhomedir/spss/clopper_pearson.txt ----- -- Bruce Weaver [hidden email] http://sites.google.com/a/lakeheadu.ca/bweaver/ "When all else fails, RTFM." NOTE: My hotmail address is for posting only, and messages sent to it will be deleted. -- View this message in context: http://www.nabble.com/Confidence-interval-of-proportion-tp25054343p25054815.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 ===================== 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 |
|
In reply to this post by Jims More
Jims More wrote:
> > I want to construct a 95% confidence interval for each proportion of > the categories of a variable. For example, marital status with > categories single, married, widowed/widower, and separated. Given the > collected data, is it possible to construct the 95% confidence > interval of the proportion of single, married, widowed/widower, and > separated? > > > > ------------------------------------------------------------------------ uses OMS to make the task automatic: **************************************************************** ** CONFIDENCE INTERVAL FOR A PROPORTION USING WILSON'S METHOD ** ** DATA ARE EXTRACTED FROM CROSSTAB TABLES USING OMS, AND ** ** MULTIPLE DATASETS ARE USED (REQUIRES SPSS 14 OR NEWER) ** **************************************************************** * Example dataset (replace by your own) *. GET FILE='GSS 93 for Missing Values.sav'. DATASET NAME OriginalData. * Don't change anything here *. PRESERVE. SET OLANG=ENGLISH. OMS SELECT TABLES /IF SUBTYPES=['Crosstabulation'] /DESTINATION FORMAT=SAV NUMBERED='id' OUTFILE='C:\Temp\table.sav'. * Crosstabulations (replace by your own variables) *. * Grouping variables in rows, the proportion variable alone in the column *. CROSSTABS /TABLES=degree wrkstat polviews BY sex /FORMAT= AVALUE TABLES /CELLS= COUNT ROW /COUNT ROUND CELL . * Don't change anything here *. OMSEND. GET FILE='C:\Temp\table.sav' /DROP= Command_ TO Var1. DATASET NAME ProcessedData. * Eliminate superfluous rows of data (step language-dependent, needs SET OLANG=ENGLISH) *. SELECT IF (Var3 EQ 'Count') AND (Var2 NE ''). COMPUTE id=$casenum. EXECUTE. /* Needed for next command *. DELETE VARIABLES Var3. * This SPSS code is adapted from a macro by Dr. Robert G. Newcombe, * University of Wales College of Medicine, Cardiff, UK. * It calculates a confidence interval for a proportion x/n, * using an appropriate method * (E.B.Wilson. J Am Stat Assoc 1927, 22, 209-212). * This part of the code is dataset-independent (even the names of the variables are authomatically read), and can be left unmodified, unless 99% CI are needed or CI for the second column (instead of first) is wanted . MATRIX. PRINT /TITLE='NEWCOMBE METHOD: CI FOR A PROPORTION'. GET data /FILE = * /NAMES = namevec. GET rnames /VAR = var2. COMPUTE vnames = namevec(3:5). PRINT data(:,3:5) /FORMAT='F8.0' /CNAMES=vnames /RNAMES=rnames /TITLE='Input data (first column is used to compute proportions & CI limits)'. COMPUTE id = data(:,1)./* Matching variable *. COMPUTE num = data(:,3)./* Replace by data(:,4) if interested in 2nd value *. COMPUTE den = data(:,5). COMPUTE p = num/den . COMPUTE z = MAKE(NROW(data),1,1.959964)./* Use MAKE(NROW(data),1,2.575829) for 99%CI *. COMPUTE x1 = 2*num+z&**2 . COMPUTE x2 = z&*SQRT(z&**2+4*num&*(1-p)). COMPUTE x3 = 2*(den+z&**2) . COMPUTE x4 = (x1-x2)/x3 . COMPUTE x5 = (x1+x2)/x3 . PRINT {100*p,100*x4,100*x5} /FORMAT='F8.2' /TITLE='Point estimate & 95%CI for a proportion' /RNAMES=rnames /CLABELS='Point','Lower','Upper'. * Export data *. COMPUTE outdata = {id,100*p,100*x4,100*x5}. COMPUTE outname = {'id','p','lower','upper'}. SAVE outdata /OUTFILE = 'C:\Temp\ProportionCI.sav' /NAMES = outname. END MATRIX. MATCH FILES /FILE=* /FILE='C:\Temp\ProportionCI.sav' /BY id. SUMMARIZE /TABLES=Var2 p lower upper /FORMAT=LIST NOCASENUM NOTOTAL /TITLE='Point estimates & 95%CI for one proportion' /FOOTNOTE 'Wilson method' /CELLS=NONE. HTH, Marta GG -- For miscellaneous SPSS related statistical stuff, visit: http://gjyp.nl/marta/ ===================== 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
|
Thanks for posting that, Marta. IIRC, my code was written pre-OMS, so I'll have to take a look at yours and see if I want to make any changes to what I wrote. For others who may be interested in this, here is the link to Robert Newcombe's homepage: www.cardiff.ac.uk/medic/contactsandpeople/n/newcombe-robert-gordon-prof-overview_new.html Click on the Resources link for Excel workbooks to do the various computations. There is a note saying that SPSS and Minitab macros are also available for some of the computations, but I don't see them on that page. Bruce
--
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/). |
|
Hi Bruce
here is the link to the SPSS stuff by Newcombe
Dr Muir Houston
Lecturer
DACE
Faculty of Education
University of Glasgow
0141-330-4699 From: SPSSX(r) Discussion on behalf of Bruce Weaver Sent: Thu 20/08/2009 13:46 To: [hidden email] Subject: Re: Confidence interval of proportion Marta García-Granero-3 wrote: |
|
Administrator
|
Very good...thanks. So from Newcombe's main page, click on Resources, then Explanation.
--
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 |
