data summarydata;
length race $6 population_total 8 service_min 8 min_per_pop 8;
input race $ population_total service_min min_per_pop;
infile datalines dsd dlm='|' ;
datalines;
race_A|42188|94961594|2250.9148
race_B|13820|32049662|2319.0783
race_C|7062|9109865|1289.9837
race_D|350|516013|1474.3229
;
run;
proc glm data=summarydata;
class race;
model min_per_pop = race;
run;
quit;
proc anova data=summarydata;
class race;
model min_per_pop = race;
run;
quit;
proc logistic data=summarydata;
class race;
model service_min/population_total =race;
run;
If you don't have a standard deviation of the minutes (or the raw data), then you cannot perform a statistical test.
If you don't have a standard deviation of the minutes (or the raw data), then you cannot perform a statistical test.
You need MEANS statement of PROC GLM to do ANOVA h-test and LSMEANS statment to "Test significant difference in mean across values of categorical varia".
I also noticed that there are only one obs for one race in your dataset,
You need include 'Population_total ' variable in PROC GLM via FREQ statement.
proc glm data=have ;
class race;
model min_per_pop = race;
means race / hovtest=levene(type=abs) tukey;
freq Population_total ;
quit;
And LSMEANS statement.
data have;
length race $6 population_total 8 service_min 8 min_per_pop 8;
input race $ population_total service_min min_per_pop;
infile datalines dsd dlm='|' ;
datalines;
race_A|42188|94961594|2250.9148
race_B|13820|32049662|2319.0783
race_C|7062|9109865|1289.9837
race_D|350|516013|1474.3229
;
run;
proc glm data=have ;
class race;
model min_per_pop = race;
means race / hovtest=levene(type=abs) tukey;
lsmeans race/adjust=tukey;
freq Population_total ;
quit;
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.