Equal percentages between groups

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Equal percentages between groups

Justin Blehar
Dear List,

Thank you so much for your assistance and I always appreciate all of your input. I hope to one day spend less time asking questions and more time helping but I doubt that will happen anytime soon! What you all do is wonderful and with that I'll roll into my current problem:) 

I have two groups that I'd like to compare with different N's. Prior to this I've selected all of the cases that fall between the 25th and 75th percentile. I now want to make the percentage of Males and Females equal for both groups. 

Group_A:
Males - 21.5%  Females - 78.5%

Group_B:
Males - 35.5% Females - 64.5%

My goal is to have the same percentage of males and females in both Group A and B. I do not want to lose any cases from Group A but will drop cases from Group B. The cases I do select from Group B (or drop) will need to be random. I was initially thinking of doing the following with Group B:

Generate one variable that assigns a random number to all male cases and second random number to all female cases (e.g. ran_male and ran_female). Next I would need to Select the appropriate percentages so they match Group A's percentages. 
But if I create two random variables I can't Select 21.5% percent of ran_male and 78.5% of ran_female as that won't give the overall correct ratio. My other issue is I know how to Select If but can you Select If randomly?

I know I'm probably missing a simple way to do this but I've been stuck on it and any help would be greatly appreciated. 

Maybe I'm over thinking this. Is there a magic Select If command I can use that will randomly select the percentages I need from Group_B to make them match Group_A?

SELECT IF RV or something?? 


Thanks!

Justin
 
Reply | Threaded
Open this post in threaded view
|

Re: Equal percentages between groups

Jon K Peck
I don't know why you want to do this, but if we can assume that everyone is either male or female, then the selection rule for B cases is the solution to
.355x = .215 * (.355x + .645)
If females are V1 eq 0 and males are V1 eq 1,

compute keep = (v1 eq 0) | (v1 eq 1 & rv.uniform(0,1) <= (.645 * .215) / (.355 - .215*.355)).
filter by keep.
freq v1.

(or select if).




Jon Peck (no "h") aka Kim
Senior Software Engineer, IBM
[hidden email]
phone: 720-342-5621




From:        Justin Blehar <[hidden email]>
To:        [hidden email],
Date:        08/05/2013 02:58 PM
Subject:        [SPSSX-L] Equal percentages between groups
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




Dear List,

Thank you so much for your assistance and I always appreciate all of your input. I hope to one day spend less time asking questions and more time helping but I doubt that will happen anytime soon! What you all do is wonderful and with that I'll roll into my current problem:)

I have two groups that I'd like to compare with different N's. Prior to this I've selected all of the cases that fall between the 25th and 75th percentile. I now want to make the percentage of Males and Females equal for both groups.

Group_A:
Males - 21.5%  Females - 78.5%

Group_B:
Males - 35.5% Females - 64.5%

My goal is to have the same percentage of males and females in both Group A and B. I do not want to lose any cases from Group A but will drop cases from Group B. The cases I do select from Group B (or drop) will need to be random. I was initially thinking of doing the following with Group B:

Generate one variable that assigns a random number to all male cases and second random number to all female cases (e.g. ran_male and ran_female). Next I would need to Select the appropriate percentages so they match Group A's percentages.
But if I create two random variables I can't Select 21.5% percent of ran_male and 78.5% of ran_female as that won't give the overall correct ratio. My other issue is I know how to Select If but can you Select If randomly?

I know I'm probably missing a simple way to do this but I've been stuck on it and any help would be greatly appreciated.

Maybe I'm over thinking this. Is there a magic Select If command I can use that will randomly select the percentages I need from Group_B to make them match Group_A?

SELECT IF RV or something??


Thanks!

Justin
 
Reply | Threaded
Open this post in threaded view
|

Re: Equal percentages between groups

Rich Ulrich
In reply to this post by Justin Blehar
Since this discarding of data seems to me like a totally ill-advised
thing to do, I am curious -- Why you are doing it?

When you parse the problem adequately, it turns into a simple
question of algebra.  Unless there are unstated provisions, the
answer shows that you drop about half the males in Group_B.

Group_A:
Males - 21.5%  Females - 78.5%

Group_B:
Included Males - 17.7% Females - 64.5%  Dropped Males - 17.8%

If you assign a random number to everyone, you can RANK within
group and sex, and FILTER on the appropriate rank or percentile extreme.

--
Rich Ulrich


Date: Mon, 5 Aug 2013 20:54:31 +0000
From: [hidden email]
Subject: Equal percentages between groups
To: [hidden email]

Dear List,

Thank you so much for your assistance and I always appreciate all of your input. I hope to one day spend less time asking questions and more time helping but I doubt that will happen anytime soon! What you all do is wonderful and with that I'll roll into my current problem:) 

I have two groups that I'd like to compare with different N's. Prior to this I've selected all of the cases that fall between the 25th and 75th percentile. I now want to make the percentage of Males and Females equal for both groups. 

Group_A:
Males - 21.5%  Females - 78.5%

Group_B:
Males - 35.5% Females - 64.5%

My goal is to have the same percentage of males and females in both Group A and B. I do not want to lose any cases from Group A but will drop cases from Group B. The cases I do select from Group B (or drop) will need to be random. I was initially thinking of doing the following with Group B:

Generate one variable that assigns a random number to all male cases and second random number to all female cases (e.g. ran_male and ran_female). Next I would need to Select the appropriate percentages so they match Group A's percentages. 
But if I create two random variables I can't Select 21.5% percent of ran_male and 78.5% of ran_female as that won't give the overall correct ratio. My other issue is I know how to Select If but can you Select If randomly?

I know I'm probably missing a simple way to do this but I've been stuck on it and any help would be greatly appreciated. 

Maybe I'm over thinking this. Is there a magic Select If command I can use that will randomly select the percentages I need from Group_B to make them match Group_A?

SELECT IF RV or something?? 


Thanks!

Justin
 
Reply | Threaded
Open this post in threaded view
|

Re: Equal percentages between groups

Justin Blehar
Rich,

Thanks a lot. It has to do with the same data-set I was working on with the matching. The purpose is to further validate an online assessment tool. Group A has an N of 130 and in addition to the online assessment they were administered an already validated measure. The internet sample (Group B) has an N of around 4500 or so. The hope was that we'd be able to perfectly match 5 internet cases for every one Group A case. We were unable to get perfect matching for case analysis even when we go to 2 cases, so now we are going to try a group analysis. I eliminated all the cases from internet sample that were outside of Group A's 25th - 75th percentile for age and education. Now I'll create the same percentage of Males and Females than start the analysis. I believe the rationale behind this is that we'll be able to state that we created a relatively similar internet sample based on age, education, and sex. 

From there we can conduct a within and between group analysis and if the results are close to the same it will provide further validation of the measure (e.g. Group A analysis showed that individuals with a greater prevalence of diabetes scored lower on the memory test Χ2 = 1.58, p = .21 Group B will show whatever it's going to show). Chi squares are done within group between individuals that had a positive test and negative test. If the within group analysis is similar for each group and variable then we should be able to argue that the new test is doing what it should be doing? I could be a little off on my explanation but not much.

Thoughts or comments are of course welcome about the data prep and analysis plan. 

Justin 

From: Rich Ulrich <[hidden email]>
Sent: Monday, August 5, 2013 8:11 PM
To: Justin Blehar; SPSS list
Subject: RE: Equal percentages between groups
 
Since this discarding of data seems to me like a totally ill-advised
thing to do, I am curious -- Why you are doing it?

When you parse the problem adequately, it turns into a simple
question of algebra.  Unless there are unstated provisions, the
answer shows that you drop about half the males in Group_B.

Group_A:
Males - 21.5%  Females - 78.5%

Group_B:
Included Males - 17.7% Females - 64.5%  Dropped Males - 17.8%

If you assign a random number to everyone, you can RANK within
group and sex, and FILTER on the appropriate rank or percentile extreme.

--
Rich Ulrich


Date: Mon, 5 Aug 2013 20:54:31 +0000
From: [hidden email]
Subject: Equal percentages between groups
To: [hidden email]

Dear List,

Thank you so much for your assistance and I always appreciate all of your input. I hope to one day spend less time asking questions and more time helping but I doubt that will happen anytime soon! What you all do is wonderful and with that I'll roll into my current problem:) 

I have two groups that I'd like to compare with different N's. Prior to this I've selected all of the cases that fall between the 25th and 75th percentile. I now want to make the percentage of Males and Females equal for both groups. 

Group_A:
Males - 21.5%  Females - 78.5%

Group_B:
Males - 35.5% Females - 64.5%

My goal is to have the same percentage of males and females in both Group A and B. I do not want to lose any cases from Group A but will drop cases from Group B. The cases I do select from Group B (or drop) will need to be random. I was initially thinking of doing the following with Group B:

Generate one variable that assigns a random number to all male cases and second random number to all female cases (e.g. ran_male and ran_female). Next I would need to Select the appropriate percentages so they match Group A's percentages. 
But if I create two random variables I can't Select 21.5% percent of ran_male and 78.5% of ran_female as that won't give the overall correct ratio. My other issue is I know how to Select If but can you Select If randomly?

I know I'm probably missing a simple way to do this but I've been stuck on it and any help would be greatly appreciated. 

Maybe I'm over thinking this. Is there a magic Select If command I can use that will randomly select the percentages I need from Group_B to make them match Group_A?

SELECT IF RV or something?? 


Thanks!

Justin
 
Reply | Threaded
Open this post in threaded view
|

Re: Equal percentages between groups

Rich Ulrich
Maybe I am not understanding this right. 

It reads to me like you are starting out with thousands of cases
to use for matching; and your first step for "matching", now, is to
make sure that there are absolutely NO matches for half your
sample according to actual age, and, separately, that there are NO
matches for half your sample for level of education. 
 - I can't imagine any audience that would be happy to hear this,
so I wonder if I have mis-parsed the description.

It sounds like you have plenty of data that you could use to draw
(smoothed) curves for age and education.  And that would be far
better than throwing away information.  If you want tests, you might
use (even) single levels of age and education to control those factors,
given that you have thousands of cases for control.

--
Rich Ulri h




Date: Tue, 6 Aug 2013 00:55:41 +0000
From: [hidden email]
Subject: Re: Equal percentages between groups
To: [hidden email]

Rich,

Thanks a lot. It has to do with the same data-set I was working on with the matching. The purpose is to further validate an online assessment tool. Group A has an N of 130 and in addition to the online assessment they were administered an already validated measure. The internet sample (Group B) has an N of around 4500 or so. The hope was that we'd be able to perfectly match 5 internet cases for every one Group A case. We were unable to get perfect matching for case analysis even when we go to 2 cases, so now we are going to try a group analysis. I eliminated all the cases from internet sample that were outside of Group A's 25th - 75th percentile for age and education.

[snip, rest, and preceding posts]

 
Reply | Threaded
Open this post in threaded view
|

Re: Equal percentages between groups

Melissa Ives
In reply to this post by Justin Blehar

Justin,

Have you considered propensity score weighting?

Melissa

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Justin Blehar
Sent: Monday, August 05, 2013 7:56 PM
To: [hidden email]
Subject: Re: [SPSSX-L] Equal percentages between groups

 

Rich,

 

Thanks a lot. It has to do with the same data-set I was working on with the matching. The purpose is to further validate an online assessment tool. Group A has an N of 130 and in addition to the online assessment they were administered an already validated measure. The internet sample (Group B) has an N of around 4500 or so. The hope was that we'd be able to perfectly match 5 internet cases for every one Group A case. We were unable to get perfect matching for case analysis even when we go to 2 cases, so now we are going to try a group analysis. I eliminated all the cases from internet sample that were outside of Group A's 25th - 75th percentile for age and education. Now I'll create the same percentage of Males and Females than start the analysis. I believe the rationale behind this is that we'll be able to state that we created a relatively similar internet sample based on age, education, and sex. 

 

From there we can conduct a within and between group analysis and if the results are close to the same it will provide further validation of the measure (e.g. Group A analysis showed that individuals with a greater prevalence of diabetes scored lower on the memory test Χ2 = 1.58, p = .21 Group B will show whatever it's going to show). Chi squares are done within group between individuals that had a positive test and negative test. If the within group analysis is similar for each group and variable then we should be able to argue that the new test is doing what it should be doing? I could be a little off on my explanation but not much.

 

Thoughts or comments are of course welcome about the data prep and analysis plan. 

 

Justin 


From: Rich Ulrich <[hidden email]>
Sent: Monday, August 5, 2013 8:11 PM
To: Justin Blehar; SPSS list
Subject: RE: Equal percentages between groups

 

Since this discarding of data seems to me like a totally ill-advised
thing to do, I am curious -- Why you are doing it?

When you parse the problem adequately, it turns into a simple
question of algebra.  Unless there are unstated provisions, the
answer shows that you drop about half the males in Group_B.

Group_A:

Males - 21.5%  Females - 78.5%

 

Group_B:

Included Males - 17.7% Females - 64.5%  Dropped Males - 17.8%


If you assign a random number to everyone, you can RANK within
group and sex, and FILTER on the appropriate rank or percentile extreme.

--
Rich Ulrich


Date: Mon, 5 Aug 2013 20:54:31 +0000
From: [hidden email]
Subject: Equal percentages between groups
To: [hidden email]

Dear List,

 

Thank you so much for your assistance and I always appreciate all of your input. I hope to one day spend less time asking questions and more time helping but I doubt that will happen anytime soon! What you all do is wonderful and with that I'll roll into my current problem:) 

 

I have two groups that I'd like to compare with different N's. Prior to this I've selected all of the cases that fall between the 25th and 75th percentile. I now want to make the percentage of Males and Females equal for both groups. 

 

Group_A:

Males - 21.5%  Females - 78.5%

 

Group_B:

Males - 35.5% Females - 64.5%

 

My goal is to have the same percentage of males and females in both Group A and B. I do not want to lose any cases from Group A but will drop cases from Group B. The cases I do select from Group B (or drop) will need to be random. I was initially thinking of doing the following with Group B:

 

Generate one variable that assigns a random number to all male cases and second random number to all female cases (e.g. ran_male and ran_female). Next I would need to Select the appropriate percentages so they match Group A's percentages. 

But if I create two random variables I can't Select 21.5% percent of ran_male and 78.5% of ran_female as that won't give the overall correct ratio. My other issue is I know how to Select If but can you Select If randomly?

 

I know I'm probably missing a simple way to do this but I've been stuck on it and any help would be greatly appreciated. 

 

Maybe I'm over thinking this. Is there a magic Select If command I can use that will randomly select the percentages I need from Group_B to make them match Group_A?

 

SELECT IF RV or something?? 

 

 

Thanks!

 

Justin

 



PRIVILEGED AND CONFIDENTIAL INFORMATION
This transmittal and any attachments may contain PRIVILEGED AND
CONFIDENTIAL information and is intended only for the use of the
addressee. If you are not the designated recipient, or an employee
or agent authorized to deliver such transmittals to the designated
recipient, you are hereby notified that any dissemination,
copying or publication of this transmittal is strictly prohibited. If
you have received this transmittal in error, please notify us
immediately by replying to the sender and delete this copy from your
system. You may also call us at (309) 827-6026 for assistance.