<?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: sample code and interpretation for a continuous outcome in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/sample-code-and-interpretation-for-a-continuous-outcome/m-p/847643#M41978</link>
    <description>&lt;P&gt;First, just so you know, I never download attachments, and so I can't view your data. The proper way to provide data is as working SAS data step code, which you can type in yourself or follow &lt;A href="https://blogs.sas.com/content/sastraining/2016/03/11/jedi-sas-tricks-data-to-data-step-macro/" target="_self"&gt;these instructions&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your problem is easily handled by PROC GLM, in which case dummy variables are not needed. Technically, its an Analysis of Variance, not a regression, although you could argue that those are really the same thing. The idea of a Pearson correlation for categorical variables doesn't hold water. This code should produce the correct analysis and t-tests of the means.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc glm data=questionnaire;
    class sample_group;
    model q6_sleep_linear=sample_group;
    means sample_group/t;
run;
quit;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp; &lt;/P&gt;</description>
    <pubDate>Sun, 04 Dec 2022 16:47:12 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2022-12-04T16:47:12Z</dc:date>
    <item>
      <title>sample code and interpretation for a continuous outcome</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/sample-code-and-interpretation-for-a-continuous-outcome/m-p/847642#M41977</link>
      <description>&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have not analyzed a continuous outcome for 5+ years. my work typically consists of analysis using logistic regression and cox regression.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you kindly help me out with the SAS code and interpretation for linear regression, pearson correlation and t-tests? I am analyzing the association between a group (4 levels) and an outcome (continuous). Please assume the outcome is continuously distributed.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Data Options:&lt;/P&gt;&lt;P&gt;1) attached SAS dataset&lt;/P&gt;&lt;P&gt;2) data step (below)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Variables:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;ID: unique key&lt;/LI&gt;&lt;LI&gt;SAMPLE_GROUP: grouping variable. values: 1,2,3,4&lt;/LI&gt;&lt;LI&gt;SAMPLE_GROUP2, SAMPLE_GROUP3, SAMPLE_GROUP4: dummy groups variables&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;Q6_SLEEP_LINEAR: continuous outcome 1 (values: 0-100)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Many many thanks!!!!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data questionnaire;&lt;BR /&gt;input id sample_group $1. sample_group2 sample_group3 sample_group4 q6_sleep_linear;&lt;BR /&gt;datalines;&lt;BR /&gt;11 4 0 0 1 25&lt;BR /&gt;12 4 0 0 1 0&lt;BR /&gt;13 1 0 0 0 50&lt;BR /&gt;14 4 0 0 1 25&lt;BR /&gt;15 1 0 0 0 75&lt;BR /&gt;16 4 0 0 1 25&lt;BR /&gt;17 3 0 1 0 75&lt;BR /&gt;18 2 1 0 0 50&lt;BR /&gt;19 3 0 1 0 75&lt;BR /&gt;20 4 0 0 1 100&lt;BR /&gt;21 1 0 0 0 75&lt;BR /&gt;22 2 1 0 0 50&lt;BR /&gt;23 3 0 1 0 50&lt;BR /&gt;24 4 0 0 1 25&lt;BR /&gt;25 1 0 0 0 0&lt;BR /&gt;26 2 1 0 0 75&lt;BR /&gt;27 2 1 0 0 0&lt;BR /&gt;28 4 0 0 1 25&lt;BR /&gt;29 4 0 0 1 100&lt;BR /&gt;30 2 1 0 0 0&lt;BR /&gt;31 2 1 0 0 100&lt;BR /&gt;32 2 1 0 0 25&lt;BR /&gt;33 1 0 0 0 50&lt;BR /&gt;34 3 0 1 0 75&lt;BR /&gt;35 4 0 0 1 25&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Sun, 04 Dec 2022 17:08:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/sample-code-and-interpretation-for-a-continuous-outcome/m-p/847642#M41977</guid>
      <dc:creator>cpeloquin</dc:creator>
      <dc:date>2022-12-04T17:08:56Z</dc:date>
    </item>
    <item>
      <title>Re: sample code and interpretation for a continuous outcome</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/sample-code-and-interpretation-for-a-continuous-outcome/m-p/847643#M41978</link>
      <description>&lt;P&gt;First, just so you know, I never download attachments, and so I can't view your data. The proper way to provide data is as working SAS data step code, which you can type in yourself or follow &lt;A href="https://blogs.sas.com/content/sastraining/2016/03/11/jedi-sas-tricks-data-to-data-step-macro/" target="_self"&gt;these instructions&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your problem is easily handled by PROC GLM, in which case dummy variables are not needed. Technically, its an Analysis of Variance, not a regression, although you could argue that those are really the same thing. The idea of a Pearson correlation for categorical variables doesn't hold water. This code should produce the correct analysis and t-tests of the means.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc glm data=questionnaire;
    class sample_group;
    model q6_sleep_linear=sample_group;
    means sample_group/t;
run;
quit;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp; &lt;/P&gt;</description>
      <pubDate>Sun, 04 Dec 2022 16:47:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/sample-code-and-interpretation-for-a-continuous-outcome/m-p/847643#M41978</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-12-04T16:47:12Z</dc:date>
    </item>
    <item>
      <title>Re: sample code and interpretation for a continuous outcome</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/sample-code-and-interpretation-for-a-continuous-outcome/m-p/847646#M41979</link>
      <description>Thank you Paige for your reply. Much appreciation!&lt;BR /&gt;&lt;BR /&gt;I added the SAS data step code to the post.&lt;BR /&gt;&lt;BR /&gt;Warm regards.</description>
      <pubDate>Sun, 04 Dec 2022 17:07:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/sample-code-and-interpretation-for-a-continuous-outcome/m-p/847646#M41979</guid>
      <dc:creator>cpeloquin</dc:creator>
      <dc:date>2022-12-04T17:07:51Z</dc:date>
    </item>
  </channel>
</rss>

