<?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: Performing a Levene's test and Shapiro Wilk test in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Performing-a-Levene-s-test-and-Shapiro-Wilk-test/m-p/286194#M15137</link>
    <description>&lt;P&gt;Remember, the assumption for ANOVA is NOT that the data are normally distributed, but that the errors are normally distributed. &amp;nbsp;A test of the data will probably lead you to a horrible place. &amp;nbsp;Consider the following: &amp;nbsp;You measure height in males and females. &amp;nbsp;If you just test height for normality, it will likely fail, because you have a bimodal distribution. &amp;nbsp;However, after removing the effect of sex and looking at the residuals for normality, you will likely see that a normal distribution fits pretty well, and so your assumptions are met.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now, you can do all of this in a straightforward way, using as&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp﻿&lt;/a&gt;&amp;nbsp;said, PROC GLM and PROC UNIVARIATE. &amp;nbsp;Try the following&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc glm data=yourdata;
class factor1 factor2;
model reactiontime = factor1*factor2; /* You need to look at a model with only the interaction, as Levene's test only applies to a one-way ANOVA)*/
means agegroup / hovtest=levene(type=abs) welch;
output out=resids r=residual;
run;

proc univariate data=resids normal;
var residual;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Now, as far as your data are concerned, this is a good start at looking at some key factors. &amp;nbsp;However, your design is such that you may want to approach the analysis a bit differently.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But that is a topic for another day.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Steve Denham&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 21 Jul 2016 17:47:01 GMT</pubDate>
    <dc:creator>SteveDenham</dc:creator>
    <dc:date>2016-07-21T17:47:01Z</dc:date>
    <item>
      <title>Performing a Levene's test and Shapiro Wilk test</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Performing-a-Levene-s-test-and-Shapiro-Wilk-test/m-p/286040#M15126</link>
      <description>&lt;P&gt;Hi, I have a pretty basic question although I am struggling to answer it.&amp;nbsp; I am new to SAS. I want to carry out a Levene's test and Shapiro Wilk test for variance and normality&amp;nbsp;of some data. &amp;nbsp;It looks as though the Shapiro Wilk can by done using the Univariate procedure or the Model procedure.&amp;nbsp; The Univariate seems the more straight forward of the two.&amp;nbsp; I am having a lot of trouble structuring the data that I want the tests performed on.&amp;nbsp; To illustrate my question, let's say I have an experiment with two within subject factors, each with two levels.&amp;nbsp; The dependent variable is performance time to complete a reaction time task.&amp;nbsp; I have this data collated on a table with four columns: participant_ID, factor_1, factor_2 and Reaction_time.&amp;nbsp; I have 10 participants.&amp;nbsp; Each participant has entries on four rows, with a reaction time for each condition/combination of each factor, so "factor_1" can be either "level_1" or "level_2" and "factor_2" &lt;SPAN&gt;can be either "level_1" or "level_2"&lt;/SPAN&gt;. I want to assess the normality of the 10 participants'' reaction times for each condition, and the equality of variances of the 10 participants' reaction times between the four conditions.&amp;nbsp; I can't find a simple way to do this.&amp;nbsp; Can you help? Kind regards, Alexa.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2016 04:45:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Performing-a-Levene-s-test-and-Shapiro-Wilk-test/m-p/286040#M15126</guid>
      <dc:creator>AlexaS</dc:creator>
      <dc:date>2016-07-21T04:45:40Z</dc:date>
    </item>
    <item>
      <title>Re: Performing a Levene's test and Shapiro Wilk test</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Performing-a-Levene-s-test-and-Shapiro-Wilk-test/m-p/286044#M15127</link>
      <description>&lt;P&gt;proc univariate can perform Normal Test.&lt;/P&gt;
&lt;P&gt;proc glm can perform equal variance test(Levene's test).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc univariate data=sashelp.class normal;&lt;BR /&gt;class sex;&lt;BR /&gt;var _numeric_;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc glm data=upsit;&lt;BR /&gt;class agegroup;&lt;BR /&gt;model smell = agegroup;&lt;BR /&gt;means agegroup / hovtest welch;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2016 05:27:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Performing-a-Levene-s-test-and-Shapiro-Wilk-test/m-p/286044#M15127</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-07-21T05:27:30Z</dc:date>
    </item>
    <item>
      <title>Re: Performing a Levene's test and Shapiro Wilk test</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Performing-a-Levene-s-test-and-Shapiro-Wilk-test/m-p/286194#M15137</link>
      <description>&lt;P&gt;Remember, the assumption for ANOVA is NOT that the data are normally distributed, but that the errors are normally distributed. &amp;nbsp;A test of the data will probably lead you to a horrible place. &amp;nbsp;Consider the following: &amp;nbsp;You measure height in males and females. &amp;nbsp;If you just test height for normality, it will likely fail, because you have a bimodal distribution. &amp;nbsp;However, after removing the effect of sex and looking at the residuals for normality, you will likely see that a normal distribution fits pretty well, and so your assumptions are met.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now, you can do all of this in a straightforward way, using as&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp﻿&lt;/a&gt;&amp;nbsp;said, PROC GLM and PROC UNIVARIATE. &amp;nbsp;Try the following&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc glm data=yourdata;
class factor1 factor2;
model reactiontime = factor1*factor2; /* You need to look at a model with only the interaction, as Levene's test only applies to a one-way ANOVA)*/
means agegroup / hovtest=levene(type=abs) welch;
output out=resids r=residual;
run;

proc univariate data=resids normal;
var residual;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Now, as far as your data are concerned, this is a good start at looking at some key factors. &amp;nbsp;However, your design is such that you may want to approach the analysis a bit differently.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But that is a topic for another day.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Steve Denham&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2016 17:47:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Performing-a-Levene-s-test-and-Shapiro-Wilk-test/m-p/286194#M15137</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2016-07-21T17:47:01Z</dc:date>
    </item>
    <item>
      <title>Re: Performing a Levene's test and Shapiro Wilk test</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Performing-a-Levene-s-test-and-Shapiro-Wilk-test/m-p/286316#M15151</link>
      <description>Dear Ksharp and Steve&lt;BR /&gt;Thanks for the help. Appreciated.&lt;BR /&gt;Kind regards, Alexa.</description>
      <pubDate>Fri, 22 Jul 2016 03:18:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Performing-a-Levene-s-test-and-Shapiro-Wilk-test/m-p/286316#M15151</guid>
      <dc:creator>AlexaS</dc:creator>
      <dc:date>2016-07-22T03:18:39Z</dc:date>
    </item>
  </channel>
</rss>

