<?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: Compare means in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Compare-means/m-p/921635#M45794</link>
    <description>&lt;P&gt;If you are concerned about normality, you can use a nonparametric test like the Kruskal-Wallis test in PROC NPAR1WAY. And since you'll be doing multiple tests - one test for each combination of continuous response variable and categorical variable -&amp;nbsp; you might want to consider using a p-value adjustment method to control the overall, family error rate. This can be done by using an adjustment method, like Holm's stepdown Bonferroni method, on the multiple p-values in PROC MULTTEST.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;An efficient way to do all of this is to rearrange your data from 200 observations into 200*k observations, where k is the number of your categorical variables. Each block of 200 will have your three continuous variables and a variable containing one of your categorical variables. You can then use BY processing in a single call of PROC NPAR1WAY to do all of the analyses. Use the OUTPUT statement to save the Kruskal-Wallis test results in a data set and then use PROC MULTTEST on that data set to do the p-value adjustment. All of that is illustrated below. The ODS statements are used to avoid displaying the results from the multiple NPAR1WAY runs.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data a; set &amp;lt;your-data&amp;gt;;
array x (*) &amp;lt;list-of-your-categorical-variables&amp;gt;;
do byvar=1 to dim(x);
 c=x(byvar); output;
end;
run;
proc sort; by byvar; run;
ods exclude all;
proc npar1way wilcoxon;
by byvar;
class c; var &amp;lt;your-continuous-variables&amp;gt;;
output out=out wilcoxon;
run;
ods select all;
proc multtest inpvalues(P_KW)=out holm;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sun, 24 Mar 2024 19:39:55 GMT</pubDate>
    <dc:creator>StatDave</dc:creator>
    <dc:date>2024-03-24T19:39:55Z</dc:date>
    <item>
      <title>Compare means</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Compare-means/m-p/921621#M45792</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Good morning everyone! I would like to ask you, I have a sample of 200 people. This sample contains several categorical variables and 3 continuous variables. I would like to see if there is a statistically significant difference in my continuous variables by categorical variable. The problem is that none of my three continuous variables follow the normal distribution. What can I do?&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;P.S&amp;nbsp;Some of my categorical variables have more than 6 levels.&lt;BR /&gt;&lt;BR /&gt;Thank you !&lt;BR /&gt;Have a nice day!&lt;/P&gt;</description>
      <pubDate>Sun, 24 Mar 2024 08:43:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Compare-means/m-p/921621#M45792</guid>
      <dc:creator>Barney1998</dc:creator>
      <dc:date>2024-03-24T08:43:42Z</dc:date>
    </item>
    <item>
      <title>Re: Compare means</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Compare-means/m-p/921623#M45793</link>
      <description>&lt;P&gt;Use PROC GLM. There is no such requirement that the raw data has a normal distribution.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/iml/2018/08/27/on-the-assumptions-and-misconceptions-of-linear-regression.html" target="_blank" rel="noopener"&gt;https://blogs.sas.com/content/iml/2018/08/27/on-the-assumptions-and-misconceptions-of-linear-regression.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc glm data=have;
     class class_variable_name;
     model continuousvar1 continuousvar2 continuousvar3=class_variable_name;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The F-test is the test which compares the means overall for each class_variable_name. You can add in the MEANS statement in PROC GLM to get more information.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;means class_variable_name/t lines;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 24 Mar 2024 10:36:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Compare-means/m-p/921623#M45793</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2024-03-24T10:36:49Z</dc:date>
    </item>
    <item>
      <title>Re: Compare means</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Compare-means/m-p/921635#M45794</link>
      <description>&lt;P&gt;If you are concerned about normality, you can use a nonparametric test like the Kruskal-Wallis test in PROC NPAR1WAY. And since you'll be doing multiple tests - one test for each combination of continuous response variable and categorical variable -&amp;nbsp; you might want to consider using a p-value adjustment method to control the overall, family error rate. This can be done by using an adjustment method, like Holm's stepdown Bonferroni method, on the multiple p-values in PROC MULTTEST.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;An efficient way to do all of this is to rearrange your data from 200 observations into 200*k observations, where k is the number of your categorical variables. Each block of 200 will have your three continuous variables and a variable containing one of your categorical variables. You can then use BY processing in a single call of PROC NPAR1WAY to do all of the analyses. Use the OUTPUT statement to save the Kruskal-Wallis test results in a data set and then use PROC MULTTEST on that data set to do the p-value adjustment. All of that is illustrated below. The ODS statements are used to avoid displaying the results from the multiple NPAR1WAY runs.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data a; set &amp;lt;your-data&amp;gt;;
array x (*) &amp;lt;list-of-your-categorical-variables&amp;gt;;
do byvar=1 to dim(x);
 c=x(byvar); output;
end;
run;
proc sort; by byvar; run;
ods exclude all;
proc npar1way wilcoxon;
by byvar;
class c; var &amp;lt;your-continuous-variables&amp;gt;;
output out=out wilcoxon;
run;
ods select all;
proc multtest inpvalues(P_KW)=out holm;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 24 Mar 2024 19:39:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Compare-means/m-p/921635#M45794</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2024-03-24T19:39:55Z</dc:date>
    </item>
    <item>
      <title>Re: Compare means</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Compare-means/m-p/921653#M45795</link>
      <description>Paige, I think Rick Wicklin's post is about simple linear regression, not ANOVA.</description>
      <pubDate>Mon, 25 Mar 2024 02:06:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Compare-means/m-p/921653#M45795</guid>
      <dc:creator>whymath</dc:creator>
      <dc:date>2024-03-25T02:06:36Z</dc:date>
    </item>
  </channel>
</rss>

