Solved
Contributor
Posts: 71

# Test for significant difference in proportion of Males from 2005 to 2010

I am trying to determine if the proportion of Males over the time period of 2005 to 2010 changes significantly. Below is a breakdown of the proportions of gender over the years time period. I am having issues determining the best process to use to conclude if there is a significant change over time in the proportion of Males for my study. Thank you for any help you can provide.

I FIRST CREATED A DATASET FROM THE PROC FREQ OUTPUT

proc freq data=demographics;

tables gender/out=gender noprint;

by year;

run;

PERFORM A TTEST TO DETERMINE IF YEAR PROPORTIONS OF MALES DIFFER - IS THIS CORRECT?

proc ttest data=gender;

var percent;

where gender = "M";

run;

PERFORM A GLM MODELING YEAR AS MY OUTCOME - IS THIS CORRECT?

proc glm data=gender;

model year=percent;

where gender = "M";

run;

 year Gender Frequency Percent of Total Count Frequency 2005 F 17248 48.6902 2005 M 18176 51.3098 2006 F 16791 49.2968 2006 M 17270 50.7032 2007 F 17027 49.6356 2007 M 17277 50.3644 2008 F 17480 49.3409 2008 M 17947 50.6591 2009 F 19291 49.2733 2009 M 19860 50.7267 2010 F 22624 49.2619 2010 M 23302 50.7381

Accepted Solutions
Solution
‎05-17-2012 02:08 PM
Posts: 2,116

## Re: Test for significant difference in proportion of Males from 2005 to 2010

Neither of the approaches that you showed are correct because they don't take the sample size into account.  There are several ways to approach this.

1. you could simply do a trend test in the PROC FREQ.  Add the TREND option to the TABLES statement.  This assumes that year is ordinal scale.
2. you could do a logistic regression with gender as the outcome and year as the predictor.  This assumes that year has a ratio scale.

Doc Muhlbaier

Duke

All Replies
Solution
‎05-17-2012 02:08 PM
Posts: 2,116

## Re: Test for significant difference in proportion of Males from 2005 to 2010

Neither of the approaches that you showed are correct because they don't take the sample size into account.  There are several ways to approach this.

1. you could simply do a trend test in the PROC FREQ.  Add the TREND option to the TABLES statement.  This assumes that year is ordinal scale.
2. you could do a logistic regression with gender as the outcome and year as the predictor.  This assumes that year has a ratio scale.

Doc Muhlbaier

Duke

Contributor
Posts: 71

## Re: Test for significant difference in proportion of Males from 2005 to 2010

Thank you for your suggestions. I do realize now that I was not taking into account sample sizes.

I ran the suggested analysis and they do tell me if the proportions of gender change over time. Thank you again.

Posts: 2,116

## Re: Test for significant difference in proportion of Males from 2005 to 2010

You are welcome.  One caution is in interpretation.  You have a very large sample size, so the test may be statistically significant without being "important".  You observed a 0.6% drop between 2005 and 2006 and no more than a 0.25% after that; which may or may not be "important" depending on the context.

🔒 This topic is solved and locked.