<?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 proc mixed for specific group comparison in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/proc-mixed-for-specific-group-comparison/m-p/556410#M155005</link>
    <description>&lt;P&gt;Hi SAS Users,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am new for proc mixed procedure. I have repeated data with 8 follow-up visit including baseline. I genearte a similar data set as below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to use proc mixed to do the analysis and compare only each follow-up visit to baseline adjusitng with tukey method.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you kindly help me to figure out what code should I insert or midify?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;data forglm(keep=person gender y1-y4)
formixed(keep=person gender visit y);
input person gender$ y1-y4;
output forglm;
y=y1; visit=1; output formixed;
y=y2; visit=2; output formixed;
y=y3; visit=3; output formixed;
y=y4; visit=4; output formixed;
datalines;
1 F 21.0 20.0 21.5 23.0
2 F 21.0 21.5 24.0 25.5
3 F 20.5 24.0 24.5 26.0
4 F 23.5 24.5 25.0 26.5
5 F 21.5 23.0 22.5 23.5
6 F 20.0 21.0 21.0 22.5
7 F 21.5 22.5 23.0 25.0
8 F 23.0 23.0 23.5 24.0
9 F 20.0 21.0 22.0 21.5
10 F 16.5 19.0 19.0 19.5
11 F 24.5 25.0 28.0 28.0
12 M 26.0 25.0 29.0 31.0
13 M 21.5 22.5 23.0 26.5
14 M 23.0 22.5 24.0 27.5
15 M 25.5 27.5 26.5 27.0
16 M 20.0 23.5 22.5 26.0
17 M 24.5 25.5 27.0 28.5
18 M 22.0 22.0 24.5 26.5
19 M 24.0 21.5 24.5 25.5
20 M 23.0 20.5 31.0 26.0
21 M 27.5 28.0 31.0 31.5
22 M 23.0 23.0 23.5 25.0
23 M 21.5 23.5 24.0 28.0
24 M 17.0 24.5 26.0 29.5
25 M 22.5 25.5 25.5 26.0
26 M 23.0 24.5 26.0 30.0
27 M 22.0 21.5 23.5 25.0
;&lt;BR /&gt;&lt;BR /&gt;data formixed2;&lt;BR /&gt;set formixed;&lt;BR /&gt;by person;&lt;BR /&gt;if first.person then base = y;&lt;BR /&gt;base +0;&lt;BR /&gt;diff = y - base;&lt;BR /&gt;output;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;proc mixed data=formixed2; &lt;BR /&gt;class gender visit person; &lt;BR /&gt;model y = base visit ; &lt;BR /&gt;repeated / type=cs sub=person;&lt;BR /&gt;/*insert appropriate code for paired comparison with tukey adjustment*/&lt;BR /&gt;run;&lt;BR /&gt;
&lt;/PRE&gt;</description>
    <pubDate>Mon, 06 May 2019 13:36:07 GMT</pubDate>
    <dc:creator>superbibi</dc:creator>
    <dc:date>2019-05-06T13:36:07Z</dc:date>
    <item>
      <title>proc mixed for specific group comparison</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-mixed-for-specific-group-comparison/m-p/556410#M155005</link>
      <description>&lt;P&gt;Hi SAS Users,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am new for proc mixed procedure. I have repeated data with 8 follow-up visit including baseline. I genearte a similar data set as below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to use proc mixed to do the analysis and compare only each follow-up visit to baseline adjusitng with tukey method.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you kindly help me to figure out what code should I insert or midify?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;data forglm(keep=person gender y1-y4)
formixed(keep=person gender visit y);
input person gender$ y1-y4;
output forglm;
y=y1; visit=1; output formixed;
y=y2; visit=2; output formixed;
y=y3; visit=3; output formixed;
y=y4; visit=4; output formixed;
datalines;
1 F 21.0 20.0 21.5 23.0
2 F 21.0 21.5 24.0 25.5
3 F 20.5 24.0 24.5 26.0
4 F 23.5 24.5 25.0 26.5
5 F 21.5 23.0 22.5 23.5
6 F 20.0 21.0 21.0 22.5
7 F 21.5 22.5 23.0 25.0
8 F 23.0 23.0 23.5 24.0
9 F 20.0 21.0 22.0 21.5
10 F 16.5 19.0 19.0 19.5
11 F 24.5 25.0 28.0 28.0
12 M 26.0 25.0 29.0 31.0
13 M 21.5 22.5 23.0 26.5
14 M 23.0 22.5 24.0 27.5
15 M 25.5 27.5 26.5 27.0
16 M 20.0 23.5 22.5 26.0
17 M 24.5 25.5 27.0 28.5
18 M 22.0 22.0 24.5 26.5
19 M 24.0 21.5 24.5 25.5
20 M 23.0 20.5 31.0 26.0
21 M 27.5 28.0 31.0 31.5
22 M 23.0 23.0 23.5 25.0
23 M 21.5 23.5 24.0 28.0
24 M 17.0 24.5 26.0 29.5
25 M 22.5 25.5 25.5 26.0
26 M 23.0 24.5 26.0 30.0
27 M 22.0 21.5 23.5 25.0
;&lt;BR /&gt;&lt;BR /&gt;data formixed2;&lt;BR /&gt;set formixed;&lt;BR /&gt;by person;&lt;BR /&gt;if first.person then base = y;&lt;BR /&gt;base +0;&lt;BR /&gt;diff = y - base;&lt;BR /&gt;output;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;proc mixed data=formixed2; &lt;BR /&gt;class gender visit person; &lt;BR /&gt;model y = base visit ; &lt;BR /&gt;repeated / type=cs sub=person;&lt;BR /&gt;/*insert appropriate code for paired comparison with tukey adjustment*/&lt;BR /&gt;run;&lt;BR /&gt;
&lt;/PRE&gt;</description>
      <pubDate>Mon, 06 May 2019 13:36:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-mixed-for-specific-group-comparison/m-p/556410#M155005</guid>
      <dc:creator>superbibi</dc:creator>
      <dc:date>2019-05-06T13:36:07Z</dc:date>
    </item>
    <item>
      <title>Re: proc mixed for specific group comparison</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-mixed-for-specific-group-comparison/m-p/556521#M155019</link>
      <description>&lt;P&gt;I used dunnett adjustement and upadted the code. It should produce what I want. I also use tukey to compare.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;proc mixed data=formixed2; 
class gender visit person; 
model y =  base visit ; 
repeated / type=cs sub=person;
lsmeans visit/diff adjust = DUNNETT;
lsmeans visit/diff adjust = tukey;
run;&lt;/PRE&gt;</description>
      <pubDate>Mon, 06 May 2019 18:41:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-mixed-for-specific-group-comparison/m-p/556521#M155019</guid>
      <dc:creator>superbibi</dc:creator>
      <dc:date>2019-05-06T18:41:12Z</dc:date>
    </item>
  </channel>
</rss>

