<?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 planned contrasts for repeated measures in glm in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/planned-contrasts-for-repeated-measures-in-glm/m-p/710817#M218883</link>
    <description>&lt;P&gt;I have a one-factor repeated measures design; this works fine for the main effect:&lt;/P&gt;&lt;P&gt;proc glm;&lt;BR /&gt;class;&lt;BR /&gt;model Meana Meanb Meanc Meand Meane Meanf Meang Meanh= /nouni;&lt;BR /&gt;repeated Segment 8;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried every syntax I could think of to carry out contrasts comparing level 1 to 5, and level 3 to 7, but none produces any contrast output.&amp;nbsp; Here is one example of my statements (yes, I have tried putting the contrast statement before the repeated statement):&lt;/P&gt;&lt;P&gt;proc glm;&lt;BR /&gt;class;&lt;BR /&gt;model Meana Meanb Meanc Meand Meane Meanf Meang Meanh= /nouni;&lt;BR /&gt;repeated Segment 8;&lt;BR /&gt;contrast '1 v. 5' 1 0 0 0 -1 0 0 0, '3 v. 7' 0 0 1 0 0 0 -1 0;&lt;BR /&gt;run;&lt;/P&gt;</description>
    <pubDate>Tue, 12 Jan 2021 15:03:39 GMT</pubDate>
    <dc:creator>montello</dc:creator>
    <dc:date>2021-01-12T15:03:39Z</dc:date>
    <item>
      <title>planned contrasts for repeated measures in glm</title>
      <link>https://communities.sas.com/t5/SAS-Programming/planned-contrasts-for-repeated-measures-in-glm/m-p/710817#M218883</link>
      <description>&lt;P&gt;I have a one-factor repeated measures design; this works fine for the main effect:&lt;/P&gt;&lt;P&gt;proc glm;&lt;BR /&gt;class;&lt;BR /&gt;model Meana Meanb Meanc Meand Meane Meanf Meang Meanh= /nouni;&lt;BR /&gt;repeated Segment 8;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried every syntax I could think of to carry out contrasts comparing level 1 to 5, and level 3 to 7, but none produces any contrast output.&amp;nbsp; Here is one example of my statements (yes, I have tried putting the contrast statement before the repeated statement):&lt;/P&gt;&lt;P&gt;proc glm;&lt;BR /&gt;class;&lt;BR /&gt;model Meana Meanb Meanc Meand Meane Meanf Meang Meanh= /nouni;&lt;BR /&gt;repeated Segment 8;&lt;BR /&gt;contrast '1 v. 5' 1 0 0 0 -1 0 0 0, '3 v. 7' 0 0 1 0 0 0 -1 0;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jan 2021 15:03:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/planned-contrasts-for-repeated-measures-in-glm/m-p/710817#M218883</guid>
      <dc:creator>montello</dc:creator>
      <dc:date>2021-01-12T15:03:39Z</dc:date>
    </item>
    <item>
      <title>Re: planned contrasts for repeated measures in glm</title>
      <link>https://communities.sas.com/t5/SAS-Programming/planned-contrasts-for-repeated-measures-in-glm/m-p/711754#M219302</link>
      <description>&lt;P&gt;If you are going to use&amp;nbsp; PROC GLM, the CONTRAST transformation on the REPEATED statement generates contrasts between levels of the factor and a reference level. By default, the procedure uses the last level as the reference level; you can optionally specify a reference level in parentheses after the keyword CONTRAST.&amp;nbsp; You will need to add the SUMMARY option to the REPEATED statement that will provide the respective results.&amp;nbsp; For example,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; repeated segment 8 / summary;&lt;/P&gt;
&lt;P&gt;You&amp;nbsp;would have&amp;nbsp;results for 7 contrasts comparing each segment to segment 8.&amp;nbsp;The results are shown under &amp;nbsp;Contrast_Variable: Segment 1,&amp;nbsp; Contrast_Variable: Segment 2,...Contrast_Variable: Segment 7.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note the PROC GLM documentation provides a Repeated Measures Example using Polynomial Transformation located&amp;nbsp;that might be helpful resource. I would also recommend reviewing the REPEATED statement SYNTAX that provides additional information.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jan 2021 19:09:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/planned-contrasts-for-repeated-measures-in-glm/m-p/711754#M219302</guid>
      <dc:creator>STAT_Kathleen</dc:creator>
      <dc:date>2021-01-15T19:09:29Z</dc:date>
    </item>
    <item>
      <title>Re: planned contrasts for repeated measures in glm</title>
      <link>https://communities.sas.com/t5/SAS-Programming/planned-contrasts-for-repeated-measures-in-glm/m-p/711791#M219318</link>
      <description>Thank you, I can get this to work, but it surprises me that I cannot&lt;BR /&gt;specify any contrast I want (such as level 3 vs. level 5). I did read all&lt;BR /&gt;about the REPEATED statement and its SYNTAX. Ciao.&lt;BR /&gt;Dan&lt;BR /&gt;</description>
      <pubDate>Fri, 15 Jan 2021 21:49:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/planned-contrasts-for-repeated-measures-in-glm/m-p/711791#M219318</guid>
      <dc:creator>montello</dc:creator>
      <dc:date>2021-01-15T21:49:13Z</dc:date>
    </item>
    <item>
      <title>Re: planned contrasts for repeated measures in glm</title>
      <link>https://communities.sas.com/t5/SAS-Programming/planned-contrasts-for-repeated-measures-in-glm/m-p/711799#M219321</link>
      <description>&lt;P&gt;You can specify&lt;/P&gt;
&lt;P&gt;&amp;nbsp; repeated segment&amp;nbsp;5 / summary;&lt;/P&gt;
&lt;P&gt;and that will provide segment 3 vs segment 5 comparison.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another approach rather than using PROC GLM you might consider using PROC MIXED. You would need to restructure the data to univariate style, specify TYPE= covariance structure and then you can write specific CONTRASTS. Note most researchers use PROC MIXED rather than PROC GLM. The following paper&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/rnd/app/stat/papers/mixedglm.pdf" target="_blank"&gt;https://support.sas.com/rnd/app/stat/papers/mixedglm.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;provides an example of doing a repeated measures using PROC GLM and PROC MIXED.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jan 2021 22:32:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/planned-contrasts-for-repeated-measures-in-glm/m-p/711799#M219321</guid>
      <dc:creator>STAT_Kathleen</dc:creator>
      <dc:date>2021-01-15T22:32:23Z</dc:date>
    </item>
    <item>
      <title>Re: planned contrasts for repeated measures in glm</title>
      <link>https://communities.sas.com/t5/SAS-Programming/planned-contrasts-for-repeated-measures-in-glm/m-p/711806#M219326</link>
      <description>Actually, no that won't. These two versions produce exactly the same&lt;BR /&gt;output:&lt;BR /&gt;&lt;BR /&gt;repeated segment 8/ summary;&lt;BR /&gt;repeated segment 5/ summary;&lt;BR /&gt;&lt;BR /&gt;"restructure the data to univariate style"? This is but one of several&lt;BR /&gt;analyses I am doing. That seems like excessive trouble just to get simple&lt;BR /&gt;contrasts.&lt;BR /&gt;</description>
      <pubDate>Fri, 15 Jan 2021 23:31:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/planned-contrasts-for-repeated-measures-in-glm/m-p/711806#M219326</guid>
      <dc:creator>montello</dc:creator>
      <dc:date>2021-01-15T23:31:13Z</dc:date>
    </item>
  </channel>
</rss>

