Programming the statistical procedures from SAS

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

Accepted Solution Solved
Reply
Contributor
Posts: 71
Accepted Solution

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;

yearGenderFrequencyPercent of Total
CountFrequency
2005F1724848.6902
2005M1817651.3098
2006F1679149.2968
2006M1727050.7032
2007F1702749.6356
2007M1727750.3644
2008F1748049.3409
2008M1794750.6591
2009F1929149.2733
2009M1986050.7267
2010F2262449.2619
2010M2330250.7381

Accepted Solutions
Solution
‎05-17-2012 02:08 PM
Trusted Advisor
Posts: 2,114

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

View solution in original post


All Replies
Solution
‎05-17-2012 02:08 PM
Trusted Advisor
Posts: 2,114

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.

Trusted Advisor
Posts: 2,114

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.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 2385 views
  • 1 like
  • 2 in conversation