<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Test significant difference in mean across values of categorical variable using summary dataset in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Test-significant-difference-in-mean-across-values-of-categorical/m-p/939791#M46908</link>
    <description>&lt;P&gt;If you don't have a standard deviation of the minutes (or the raw data), then you cannot perform a statistical test.&lt;/P&gt;</description>
    <pubDate>Sun, 18 Aug 2024 22:24:25 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2024-08-18T22:24:25Z</dc:date>
    <item>
      <title>Test significant difference in mean across values of categorical variable using summary dataset</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Test-significant-difference-in-mean-across-values-of-categorical/m-p/939790#M46907</link>
      <description>&lt;DIV&gt;/*&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I have a dataset that contains summarized data on a group of people who received&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;healthcare services. The data is summarized by several characteristics of the people,&lt;/DIV&gt;&lt;DIV&gt;such as race, gender, marital status, etc. In my example below, I have created a&lt;/DIV&gt;&lt;DIV&gt;fake dataset of the summary race data.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Race is a character variable with different values of race (race A, race B, etc.).&lt;/DIV&gt;&lt;DIV&gt;Population_total is the number of individuals (n)&amp;nbsp; in the particular race category.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Service_min is the number of healthcare service minutes summed across all individuals in the race category.&lt;/DIV&gt;&lt;DIV&gt;Min_per_pop is the average number of service minutes per individual in the race category:&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;min_per_pop = service_min / population_total&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;What is the best way to determine whether there is a significant difference in service&lt;/DIV&gt;&lt;DIV&gt;minutes across the categories of race, using this summary data?&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;*/&lt;/DIV&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;CODE class=""&gt;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;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;DIV&gt;/* I have tried a one-way ANOVA using both proc glm and proc anova per the following code,&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;but they do not return any p-value or significance test results. The F value and p-value are blank.&lt;/DIV&gt;&lt;DIV&gt;*/&lt;/DIV&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;CODE class=""&gt;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;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;DIV&gt;/* I have also tried proc logistic, using the counts instead, but it creates this error:&lt;/DIV&gt;&lt;DIV&gt;ERROR: No valid observations due either to missing values in the response,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;explanatory, frequency, or weight variable, or to nonpositive frequency or&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;weight values.&lt;/DIV&gt;&lt;DIV&gt;*/&lt;/DIV&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;CODE class=""&gt;proc logistic data=summarydata;
class race;
model service_min/population_total =race;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;DIV&gt;/* What am I doing wrong? Or what is a better way to test for significant differences?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I also know there is a macro&amp;nbsp;&lt;SPAN&gt;%SUM_GLM that can be used for a one-way ANOVA on summary&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;data, but it requires the standard deviation, which I do not have. I only have the 3 numeric measures above.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;*/&lt;/DIV&gt;</description>
      <pubDate>Sun, 18 Aug 2024 22:12:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Test-significant-difference-in-mean-across-values-of-categorical/m-p/939790#M46907</guid>
      <dc:creator>annisann</dc:creator>
      <dc:date>2024-08-18T22:12:36Z</dc:date>
    </item>
    <item>
      <title>Re: Test significant difference in mean across values of categorical variable using summary dataset</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Test-significant-difference-in-mean-across-values-of-categorical/m-p/939791#M46908</link>
      <description>&lt;P&gt;If you don't have a standard deviation of the minutes (or the raw data), then you cannot perform a statistical test.&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2024 22:24:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Test-significant-difference-in-mean-across-values-of-categorical/m-p/939791#M46908</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2024-08-18T22:24:25Z</dc:date>
    </item>
    <item>
      <title>Re: Test significant difference in mean across values of categorical variable using summary dataset</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Test-significant-difference-in-mean-across-values-of-categorical/m-p/939807#M46911</link>
      <description>&lt;P&gt;You need MEANS statement of PROC GLM to do ANOVA h-test and LSMEANS statment&amp;nbsp; to "&lt;SPAN class="lia-link-navigation child-thread lia-link-disabled" aria-disabled="true" aria-label="Test significant difference in mean across values of categorical variable using summary dataset"&gt;Test significant difference in mean across values of categorical varia".&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="lia-link-navigation child-thread lia-link-disabled" aria-disabled="true" aria-label="Test significant difference in mean across values of categorical variable using summary dataset"&gt;&lt;SPAN&gt;I also noticed that there are only one obs for one race in your dataset,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You need include 'Population_total ' variable in PROC GLM via FREQ statement.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
proc glm data=have ;
class race;
model min_per_pop = race;
means race / hovtest=levene(type=abs) tukey;
freq Population_total ;
quit;

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;And LSMEANS statement.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;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;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2024 01:31:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Test-significant-difference-in-mean-across-values-of-categorical/m-p/939807#M46911</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2024-08-19T01:31:58Z</dc:date>
    </item>
    <item>
      <title>Re: Test significant difference in mean across values of categorical variable using summary dataset</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Test-significant-difference-in-mean-across-values-of-categorical/m-p/940787#M46967</link>
      <description>thank you!</description>
      <pubDate>Sun, 25 Aug 2024 21:51:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Test-significant-difference-in-mean-across-values-of-categorical/m-p/940787#M46967</guid>
      <dc:creator>annisann</dc:creator>
      <dc:date>2024-08-25T21:51:08Z</dc:date>
    </item>
  </channel>
</rss>

