<?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 Setting up a general linear model with multiple comparisons or contrasts in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Setting-up-a-general-linear-model-with-multiple-comparisons-or/m-p/483799#M25121</link>
    <description>&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have data containing one dependent variable, I'll call it Y for simplicity, and let's assume it is normally distributed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have independent variables X1, X2, X3, X4. All of them are ordinal, getting values of 1-4, where 4 is highest and 1 lowest. In addition, I have some covariates, such as age, gender, etc...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wish to model Y vs. the independent variables and the covariates, but I am mostly interested in finding if there are significant differences between groups 1 and 4 of each independent variable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using the following code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC GLM DATA = Dat;
    CLASS X1;
    MODEL Y = X1 Age Gender ;
    LSMEANS X1 / cl pdiff diff;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Gives me a linear model, with multiple comparisons of all pairs of the variable X1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a better way to model in this situation ? Is there a way to define something like a contrast, so only groups 1 and 4 will be compared with higher power ? Is my code correct in the first place ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance !&lt;/P&gt;</description>
    <pubDate>Fri, 03 Aug 2018 14:50:51 GMT</pubDate>
    <dc:creator>BlueNose</dc:creator>
    <dc:date>2018-08-03T14:50:51Z</dc:date>
    <item>
      <title>Setting up a general linear model with multiple comparisons or contrasts</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Setting-up-a-general-linear-model-with-multiple-comparisons-or/m-p/483799#M25121</link>
      <description>&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have data containing one dependent variable, I'll call it Y for simplicity, and let's assume it is normally distributed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have independent variables X1, X2, X3, X4. All of them are ordinal, getting values of 1-4, where 4 is highest and 1 lowest. In addition, I have some covariates, such as age, gender, etc...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wish to model Y vs. the independent variables and the covariates, but I am mostly interested in finding if there are significant differences between groups 1 and 4 of each independent variable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using the following code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC GLM DATA = Dat;
    CLASS X1;
    MODEL Y = X1 Age Gender ;
    LSMEANS X1 / cl pdiff diff;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Gives me a linear model, with multiple comparisons of all pairs of the variable X1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a better way to model in this situation ? Is there a way to define something like a contrast, so only groups 1 and 4 will be compared with higher power ? Is my code correct in the first place ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance !&lt;/P&gt;</description>
      <pubDate>Fri, 03 Aug 2018 14:50:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Setting-up-a-general-linear-model-with-multiple-comparisons-or/m-p/483799#M25121</guid>
      <dc:creator>BlueNose</dc:creator>
      <dc:date>2018-08-03T14:50:51Z</dc:date>
    </item>
    <item>
      <title>Re: Setting up a general linear model with multiple comparisons or contrasts</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Setting-up-a-general-linear-model-with-multiple-comparisons-or/m-p/483801#M25122</link>
      <description>&lt;P&gt;Use the CONTRAST statement in PROC GLM&lt;/P&gt;
&lt;P&gt;&lt;A href="http://documentation.sas.com/?cdcId=pgmmvacdc&amp;amp;cdcVersion=9.4&amp;amp;docsetId=statug&amp;amp;docsetTarget=statug_glm_syntax06.htm&amp;amp;locale=en" target="_blank"&gt;http://documentation.sas.com/?cdcId=pgmmvacdc&amp;amp;cdcVersion=9.4&amp;amp;docsetId=statug&amp;amp;docsetTarget=statug_glm_syntax06.htm&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Aug 2018 14:53:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Setting-up-a-general-linear-model-with-multiple-comparisons-or/m-p/483801#M25122</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-08-03T14:53:42Z</dc:date>
    </item>
  </channel>
</rss>

