BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
HyunJee
Fluorite | Level 6

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
1 ACCEPTED SOLUTION

Accepted Solutions
Doc_Duke
Rhodochrosite | Level 12

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

3 REPLIES 3
Doc_Duke
Rhodochrosite | Level 12

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

HyunJee
Fluorite | Level 6

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.

Doc_Duke
Rhodochrosite | Level 12

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.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

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