#### stat question: comparing proportions in 2 dependent samples

```I'm looking for an appropriate statistical test for the difference in
proportions. I want to compare the proportion of a factor (for example,
males) in population A versus the proportion in population B.
However, population A is a partial subset of the larger population B (i.e.,
most, but not all, of population A is contained in population B).
I can't use the ChiSquare test as the 2 samples are not independent (such
as cases vs controls). I'm reluctant to use the McNemar's test for
dependent proportions as the 2 samples are not paired (such as before vs
after in the same population). Can anyone recommend a suitable statistical
test for the difference in these proportions? I'd be delighted with any SAS
code as well!
```
 0
wcw2 (31)
7/17/2007 5:58:52 PM
comp.soft-sys.sas 136569 articles. 1 followers.

2 Replies
622 Views

Similar Articles

[PageSpeed] 37
```Take a look at the proc freq documentation.  One thing you will find is:

McNemar's test
Beginning in Release 6.10, use the AGREE option in Base SAS PROC FREQ.
Before Release 6.10, create a three-way table with a stratum variable
identifying each subject (or matched group), a variable indicating each
occasion (condition or individual within matched group), and a binary
response variable. Then use the CMH option. For example, if each subject
gives a binary response to each of two drugs, use the statement:
tables subject*drug*response/cmh2 noprint;

HTH,
Art
--------
On Tue, 17 Jul 2007 13:58:52 -0400, wcw2 <wcw2@CDC.GOV> wrote:

>I'm looking for an appropriate statistical test for the difference in
>proportions. I want to compare the proportion of a factor (for example,
>males) in population A versus the proportion in population B.
>However, population A is a partial subset of the larger population B
(i.e.,
>most, but not all, of population A is contained in population B).
>I can't use the ChiSquare test as the 2 samples are not independent (such
>as cases vs controls). I'm reluctant to use the McNemar's test for
>dependent proportions as the 2 samples are not paired (such as before vs
>after in the same population). Can anyone recommend a suitable statistical
>test for the difference in these proportions? I'd be delighted with any
SAS
>code as well!
```
 0
art297 (4213)
7/17/2007 11:10:00 PM
```wcw2@CDC.GOV wrote:
>
>I'm looking for an appropriate statistical test for the difference in
>proportions. I want to compare the proportion of a factor (for example,
>males) in population A versus the proportion in population B.
>However, population A is a partial subset of the larger population B (i.e.,
>most, but not all, of population A is contained in population B).
>I can't use the ChiSquare test as the 2 samples are not independent (such
>as cases vs controls). I'm reluctant to use the McNemar's test for
>dependent proportions as the 2 samples are not paired (such as before vs
>after in the same population). Can anyone recommend a suitable statistical
>test for the difference in these proportions? I'd be delighted with any SAS
>code as well!

Why?

I'm not being frivolous.  The underlying reason for this is likely to
determine
whether this is statistically appropriate or not.  Either way, you ought to
be looking at sample B vs. (population A - sample B).

If you have two proportions which come from different samples, but
there is an issue with the populations that the samples come from, then
that is a completely different question.

So I'm not clear on exactly what you want.

HTH,
David
--
David L. Cassell
mathematical statistician
Design Pathways
3115 NW Norwood Pl.
Corvallis OR 97330

_________________________________________________________________
http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_migration_HM_mini_2G_0507
```
 0
davidlcassell (5567)
7/26/2007 9:16:39 PM
Similar artilces about - stat question: comparing proportions in 2 dependent samples:

A canvas question
Hello out there, Tk's canvas is a marvellous widget, albeit a bit complex. Right now I'm struggling with the following: I have lots of text items on a canvas, and for some of them I want to change the font color and the background. Changing the font color is easy with the -fill option, but I haven't found a way to individually set the background color for a text item. I hope that I'm just overlooking something obvious. Any hints or ideas will be greatly appreciated. Best regards Helmut Giese Helmut Giese wrote: > Hello out there, > Tk's canvas is a marvellous widget,...

Re: Secondary and TLD not updating #2
Just because individual records are public doesn't mean you should allow just anyone to configure their nameserver as a slave to your domain. There's no benefit to allowing transfers to just anybody except for the allowance it makes for the laziness of admins. Weigh that against the risks of DoS attacks, and the sucking up of previous upload bandwidth by domain transfers out. Each such transfer could well use many many queries worth of bandwidth. Its one more potential vulnerability with no particular benefit. Sounds like a poor trade to me. ------Original Message...

OK, OK, I've never really messed with threads and suddenly have a reason to. I'm trying to grok it all and get a little sample code going that carries out some basic mechanics, and I'm having one problem that is probably very simple but I can't figure it out. Any dope-slaps appreciated, I've FAQ'd and Googled and Camel'ed for a few hours to no avail so far. This sample code launches \$num_threads threads via async that just count to random numbers, and get collected by the parent. That part works fine, the threads spawn, do their thing, and end, but what I ca...

DynamicModule question
Can someone please explain to me why the following happens? It's a silly little example to illustrate a problem I ran into recently... First, evaluate the following in separate cells: Needs["PieCharts`"]; data = {.25, .75} Then evaluate the following: DynamicModule[{size = 300}, Column[{ Slider[Dynamic[size], {100, 500}], Dynamic[PieChart[data, ImageSize -> size]] }] ] Notice that you can not only resize the graphic by dragging the slider, but if you change the definition of data, that's reflected automatically in the gr...

Reading 3d STL files in MATLAB and changing their orientation #2
How to read STL files in MATLAB. I am working on a project related to multiple objects packing in a 3D-box. I have a square, triangle and Rectangular boxes. I want to read their STL files first in MATLAB and then I want to rotate their positions based on the orientation. I am stucked at this point because I cant figure out how to orient their positions in MATLAB. Any kind of help in this regard is greatly appreciated. Thanks Tarun ...

NTP, Mac OS X & Cisco 837
Some interesting stats come up with ntpq -p: ntpq -p remote refid st t when poll reach delay offset jitter ============================================================================ == +bm1.asia.apple. time1.euro.appl 2 u 118 128 377 127.025 -227.69 401.635 +mel001.pacific. murgon.cs.mu.oz 2 u 101 128 377 36.358 -219.35 435.265 +marvin.ci.com.a .PPS. 1 u 63 128 377 36.375 -246.40 40.575 *murgon.cs.mu.oz .GPS. 1 u 114 128 377 32.412 -231.68 410.731 +ntp1.cs.mu.oz.a .GPS. 1 u 114 128 377 42.499 -228.29 4...

Re: Acceleration Question
There is a good way to accelerate a stepper motor on this site: http://mysite.wanadoo-members.co.uk/stepper Dave Austin >From: James Williams (james@williams-eng.com) >Subject: Acceleration Question View this article only >Newsgroups: comp.dsp >Date: 2004-10-09 15:04:29 PST >I know this might sound dump, but I will ask anyway. If I have a motor >which has an acceleration rate of 50rps/sec ^^, does this mean that once I >initiate the motor to start turning, that when 1 second is over, it should >be turning at a rate of 50rps? > >If so, then how do I con...

Stats n stats n stats
Since we have one of the most intense political races in recent history it's always interesting to see stats on how things shape up. Behind every good database are good stats. This underscores a bit what Gumby has been harping on, without the numbers you really don't have credibility when shaping opinion. Lies, damn lies and statistics... I love it. I do like stats, and well, this is somewhat related to what we do in our daily database world. One of the more interesting stats sites for politics is fivethirtyeight.com . This guy has a lot of chatter about polls right now...

Re: easter script #2
I had posted an adaption of this last summer, in response to something of a challenge issued by Jeff Kell. http://raven.utc.edu/cgi-bin/WA.EXE?A2=ind0503d&L=hp3000-l&D=0&P=12264 Now, if someone's shop takes Good Friday off, it would be interesting to see this tweaked to that end. Greg Stigers * To join/leave the list, search archives, change list settings, * * etc., please visit http://raven.utc.edu/archives/hp3000-l.html * ...

Re: A stat question #5
Lu Liu <Lu.Liu@TALBOTS.COM> wrote: > Below are the group size and their respective std. dev and means for > each variable. I also want to mention that in this case, I actually > split the entire population ~52,000 into 2 equal groups so they are > not samples. > > > Group A Size = 26,004 > Order Sales AOS > Std. Dev 0.0503 14.0272 13.8897 > Means 0.0024 0.5802 0.5706 > > > Group B Size = 26,005 > Order Sales AOS > Std. Dev 0.0600 23.0460 23.021...

CfP
[apologies for cross-postings] ______________________________________________________________________ CALL FOR PAPERS --------------- EMBEDDED SYSTEMS: Applications, Solutions, and Techniques Special Track in SAC 2005 20th Annual ACM Symposium on Applied Computing http://www.acm.org/conferences/sac/sac2005 sponsored by ACM SIGAPP March 13-17, 2005, Santa Fe, New Mexico, USA ...

PPMZ2 Question!!
Hello everyone!! This question might seems a little bit simple. I am working with text files of 256 or 512 KB of syze that I need to compress at maximum. Fist I used ZLib library and then I "discovered" libzip2 library that can achieve better compression rates. A friend of mine said to me that PPM family compressors achieve better compression than libzip2 and so found a nice executable by Charles Bloom called ppmz2. What I need to know is: Does anybody knows where I can find a Dynamic Link Library (dll) that use ppmz2 algorithm ?? I am asking this because my work is not about compre...

Re: Include Rho in Output Dataset #2
but the best way (if you have SAS version 9 or higher) is to use the ODS OUTPUT method: Type this code: ODS TRACE ON; ODS OUTPUT PEARSONCORR=3Dx.rCorr; * proc* *corr* data =3D trans Pearson ; *noprint ; *if you use option noprint it won=B4t give you the statistics you want; var var1-var23 ; * run*; *QUIT*; ODS OUTPUT CLOSE; ODS TRACE OFF; /* ODS TRACE ON lists in the LOG the different outputs you can reach callin= g them like this: ODS OUTPUT the_output_name_you_see_at_LOG=3D the_dataset_name_you_want ; as ODS OUTPUT PEARSONCORR=3D x.rCorr did. */ Dani Fern=E1ndez. Terrassa ...

removing carriage returns(vbdos/qbasic) #2
-> hi, what way is best to remove carriage returns from a file read, can -> it be done from the string\$ , blabla = LTRIM\$(RTRIM\$..... is removing -> the spaces on each end but i need the carriage returns striped also. DO WHILE RIGHT\$(S\$, 1) = CHR\$(13) S\$ = LEFT\$(S\$, LEN(S\$) - 1) LOOP DO WHILE LEFT\$(S\$, 1) = CHR\$(13) S\$ = MID\$(S\$, 2) LOOP dow Hi, The file im trying to read is any file dos/win9x creates when you run a command prompt and ask it to create the file of results. i.e 'ver >test.txt' it se...

Problem after update to wxWidgets 2.6.2
Hello! I updated wxWidgets from version 2.5 to 2.6.2- there were no problems. I rebuilt my application- there were no errors or warnings. But when I started it I receive following error: /usr/lib/libwx_gtk2u_core-2.6.so.0: version 'WXU_2.6.2' not found I see that line in the output of ldd command too. Do I have to replace all wxT macros with wxU? Or there is another solution? I appreciate any solutions! Thanks in advance! Best regards, Petyo Milotinov --------------------------------------------------------------------- To unsubscribe, e-mail: wx-users-unsub...

-----Original Message----- From: Bruce Momjian [mailto:pgman@candle.pha.pa.us] Sent: Fri 7/30/2004 5:34 PM To: Dave Page Cc: Tom Lane; Andreas Pflug; PostgreSQL Patches Subject: Re: [PATCHES] Admin functions contrib =20 > Ouch, that is a powerful argument! The big problem is that we are > designing features a month after feature freeze. Not that the ideas > weren't around before feature freeze, but they are still not solid from > a community agreement perspective. Let's get the logging working and > then figure out what to do, OK? Sounds good to me :-)...

Graffiti 2 newbie & struggling
Hi, I've just upgraded to a Zire 21 from an m105 and trying to get used to Graffiti 2. The jury's still out on what I think about G2...however I am having a ridiculous amount of trouble getting the punctuation stroke to register. Everything else works just fine, I've calibrated the digitiser (umpteen times now), and still the recognition of the punctuation stroke is enormously erratic. Sometimes it works just fine, other times I can do it like a dozen times and it won't take it, no sign of the 'up- arrow' symbol appearing. Doesn't seem to make any difference ...

A question on plot3D
Good day Group, Is there a way to remove frame from a 3D plot in mathematica? I am writing a Journal paper in which I have about 8 3D plots from mathematica and they seem to be taking so much space. Any help on ways to make mathematica's 3D plot consume less space will be appreciated. Thanks you all in advance. Boxed -> False, Axes -> False Boxed -> False, Axes -> False Here is a possible solution. You need to append the options Axes -> False, Boxed -> False to your plot command line. For example: try the following (note: the original Plot3D comma...

Repetetive code question
Not sure if this is the right place to ask this question as it is more an html query than a php one but here goes anyway. I have a large chunk of html code that is used to build an extensive drop down menu. The same code is used on all 30 of my web pages. So I have seperated the code into a txt file called menu.txt and used the following php code to get the file contents: [ <?php \$mymenu=file_get_contents('menu.txt'); echo \$mymenu; ?> ] Everthing works fine but is this good practice and is there a better way. TIA Dynamo On 15/11/12 12:26, Dynamo wrote: >...

Boot.ini and Win2K question
I want to make changes to c:\boot.ini but this is a read-only file. How can I make read/write file? -ishwar rattan@cps.cmich.edu writes: > I want to make changes to c:\boot.ini but this is a read-only file. How > can I > make read/write file? It's both a hidden and a system file, so you have to unset those flags before editing. DOS prompt attrib -h -s boot.ini [edit the file ] attrib +h +s boot.ini Best REgards, -- Todd H. http://www.toddh.net/ Todd brought up the DOS way. Through Windows, unhide system files, then find the file, right-clic...

alt.os.linux.suse stats vs. cola stats
You guys should check out the stats they use for alt.os.linux.suse. They are a lot nicer than COLA stats. For example, they show posts by *timezone* -- very cool !!! ============================================================================ Top 10 time zones ============================================================================ 1: UTC............................................................ : 491 2: +0100.......................................................... : 213 3: -0500.......................................................... : ...

newbie question: airport card compatibility
Hi all, Just bought an original airport card ( 802.11b ) for a clamshell iBook--and have had problems downloading webpages from two separate routers, one at a cafe, and my own. In both cases, signal strength shows up but web pages cannot render. The latter case was resolved when I turned down the D-link router's proprietary compression technique ( which naturally the airport card wouldn't handle ). Is there anything I can do to improve compatibility ( upgrade drivers, etc.)? Also, what general classes of routers will the airport card have trouble with? ( 802.11g? ) On average, w...

The New powerful DVD ripper software, Aimersoft DVD Ripper now released! #2
<a href=" http://www.iskysoft.com/dvd-ripper-mac.html"> iSkysoft DVD Ripper for mac</a> has a clear and intuitive interface with an effortless access to all the options available. It can rip DVD to all sorts of video files and extract DVD audio to various audio files. This DVD Ripper for Mac users can rip DVD to video formats including MP4, WMV, AVI, MOV, M4V, 3GP, MPG, MPEG, FLV, and VOB; and it can convert DVD audio to MP3, WMA, M4A, AAC, AC3 etc. <img src="http://www.hd-dvd-ripper.net/image/i-ad/dvd-ripper- mac2.jpg"> Here are the advantages i...

Re: 9.2.3 EDNS0 incompatibility
It's a bug in nsupdate. It should cope with this sort of NXDOMAIN. Use server and zone commands to workaround the problem. server pm-members.mac.com. zone csharp.members.mac.com. <rest of update commands> > Your response indicates that I could have done a better job at > articulating the problem. Here is what I think the client-server-server > communication looks like: > client query SOA ? ---> 9.2.3 Server query SOA + OPT RR ---> Authority > for members.mac.com > Authority for members.mac.com responds FormErr ---> 9.2.3 > 9....

Stats comp.os.linux.misc (last 7 days) #216
Stats comp.os.linux.misc (last 7 days) Top 10 posters for the period: rank posts kbytes name address 1 15 57.3 Allan Adler ara@nestle.csail.mit.edu 2 12 162.4 sara.girl55@gmail.com 3 9 27.5 Dan Espen daneNO@MORE.mk.SPAMtelcor 4 8 22.7 Tauno Voipio tauno.voipio@INVALIDiki.f 5 8 21.2 Floyd L. Davidson floyd@apaflo.com 6 7 16.3 Rodney me@127.0.0.1 7 7 15.3 European European.r7@gmail.com 8 6 13.5 The N...