<?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: Residuals from proc reg AND categorical independent variable in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Residuals-from-proc-reg-AND-categorical-independent-variable/m-p/580704#M28477</link>
    <description>&lt;P&gt;This glm proc runs because the categorical variable iv is numeric. But it is treated as interval, and NOT categorical because it is not mentioned in a CLASS statement. In other words, you are running a regression instead of an ANOVA.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Add the statement&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;CLASS iv;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;to your glm code to get an ANOVA.&lt;/P&gt;</description>
    <pubDate>Tue, 13 Aug 2019 03:50:48 GMT</pubDate>
    <dc:creator>PGStats</dc:creator>
    <dc:date>2019-08-13T03:50:48Z</dc:date>
    <item>
      <title>Residuals from proc reg AND categorical independent variable</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Residuals-from-proc-reg-AND-categorical-independent-variable/m-p/580674#M28472</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are trying to test for normality on residuals of the dv when the iv is categorical. Proc reg does not run when iv is categorical.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc reg data=sample1;&lt;BR /&gt;model dv= iv;&lt;BR /&gt;output out = notrans r= resid;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc univariate data=notrans noprint;&lt;BR /&gt;var resid;&lt;BR /&gt;histogram resid/normal kernel;&lt;BR /&gt;qqplot resid/normal (mu = est sigma=est);&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Aug 2019 22:46:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Residuals-from-proc-reg-AND-categorical-independent-variable/m-p/580674#M28472</guid>
      <dc:creator>ANKH1</dc:creator>
      <dc:date>2019-08-12T22:46:19Z</dc:date>
    </item>
    <item>
      <title>Re: Residuals from proc reg AND categorical independent variable</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Residuals-from-proc-reg-AND-categorical-independent-variable/m-p/580675#M28473</link>
      <description>What's your hypothesis? It seems weird to do regression with a single categorical variable, that seems more designed for an ANOVA instead.</description>
      <pubDate>Mon, 12 Aug 2019 22:52:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Residuals-from-proc-reg-AND-categorical-independent-variable/m-p/580675#M28473</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-08-12T22:52:42Z</dc:date>
    </item>
    <item>
      <title>Re: Residuals from proc reg AND categorical independent variable</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Residuals-from-proc-reg-AND-categorical-independent-variable/m-p/580681#M28474</link>
      <description>&lt;P&gt;PROC REG doesn't work with categorical variables but PROC GLM does.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Aug 2019 23:21:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Residuals-from-proc-reg-AND-categorical-independent-variable/m-p/580681#M28474</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-08-12T23:21:04Z</dc:date>
    </item>
    <item>
      <title>Re: Residuals from proc reg AND categorical independent variable</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Residuals-from-proc-reg-AND-categorical-independent-variable/m-p/580682#M28475</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/226521"&gt;@ANKH1&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We are trying to test for normality on residuals of the dv when the iv is categorical. Proc reg does not run when iv is categorical.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is the code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc reg data=sample1;&lt;BR /&gt;model dv= iv;&lt;BR /&gt;output out = notrans r= resid;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc univariate data=notrans noprint;&lt;BR /&gt;var resid;&lt;BR /&gt;histogram resid/normal kernel;&lt;BR /&gt;qqplot resid/normal (mu = est sigma=est);&lt;BR /&gt;run;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;"Does not run" is awful vague.&lt;BR /&gt;&lt;BR /&gt;Are there errors in the log?: Post the code and log in a code box opened with the {i} to maintain formatting of error messages.&lt;BR /&gt;&lt;BR /&gt;No output? Post any log in a code box.&lt;BR /&gt;&lt;BR /&gt;Unexpected output? Provide input data in the form of data step code pasted into a code box, the actual results and the expected results. Instructions here: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat&lt;/A&gt;... will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the {i} icon or attached as text to show exactly what you have and that we can test code against.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If your IV variable is character then Proc Reg won't run as it is only for numeric values.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Aug 2019 23:22:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Residuals-from-proc-reg-AND-categorical-independent-variable/m-p/580682#M28475</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-08-12T23:22:06Z</dc:date>
    </item>
    <item>
      <title>Re: Residuals from proc reg AND categorical independent variable</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Residuals-from-proc-reg-AND-categorical-independent-variable/m-p/580688#M28476</link>
      <description>If you're trying to verify the assumptions, you would need to ensure the distributions are similar for the ANOVA, it's pretty robust to non-normal distributions as long as the distributions are similar and the standard deviations are similar.</description>
      <pubDate>Tue, 13 Aug 2019 00:28:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Residuals-from-proc-reg-AND-categorical-independent-variable/m-p/580688#M28476</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-08-13T00:28:33Z</dc:date>
    </item>
    <item>
      <title>Re: Residuals from proc reg AND categorical independent variable</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Residuals-from-proc-reg-AND-categorical-independent-variable/m-p/580704#M28477</link>
      <description>&lt;P&gt;This glm proc runs because the categorical variable iv is numeric. But it is treated as interval, and NOT categorical because it is not mentioned in a CLASS statement. In other words, you are running a regression instead of an ANOVA.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Add the statement&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;CLASS iv;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;to your glm code to get an ANOVA.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2019 03:50:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Residuals-from-proc-reg-AND-categorical-independent-variable/m-p/580704#M28477</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2019-08-13T03:50:48Z</dc:date>
    </item>
    <item>
      <title>Re: Residuals from proc reg AND categorical independent variable</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Residuals-from-proc-reg-AND-categorical-independent-variable/m-p/580859#M28481</link>
      <description>Yes, it is Anova</description>
      <pubDate>Tue, 13 Aug 2019 15:36:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Residuals-from-proc-reg-AND-categorical-independent-variable/m-p/580859#M28481</guid>
      <dc:creator>ANKH1</dc:creator>
      <dc:date>2019-08-13T15:36:57Z</dc:date>
    </item>
    <item>
      <title>Re: Residuals from proc reg AND categorical independent variable</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Residuals-from-proc-reg-AND-categorical-independent-variable/m-p/580861#M28482</link>
      <description>Thank you!</description>
      <pubDate>Tue, 13 Aug 2019 15:37:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Residuals-from-proc-reg-AND-categorical-independent-variable/m-p/580861#M28482</guid>
      <dc:creator>ANKH1</dc:creator>
      <dc:date>2019-08-13T15:37:22Z</dc:date>
    </item>
    <item>
      <title>Re: Residuals from proc reg AND categorical independent variable</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Residuals-from-proc-reg-AND-categorical-independent-variable/m-p/580865#M28483</link>
      <description>It worked! Thank you very much.</description>
      <pubDate>Tue, 13 Aug 2019 15:38:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Residuals-from-proc-reg-AND-categorical-independent-variable/m-p/580865#M28483</guid>
      <dc:creator>ANKH1</dc:creator>
      <dc:date>2019-08-13T15:38:54Z</dc:date>
    </item>
  </channel>
</rss>

