<?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: proc mixed, same number of observations used, different estimates in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/proc-mixed-same-number-of-observations-used-different-estimates/m-p/832963#M41259</link>
    <description>&lt;P&gt;Adding the R option to the REPEATED statement will show you the block of R for the first subject. You can specify multiple subject numbers using R=1,2,4,8 to print the block of R for the 1st, 2nd, 4th, and 8th subject. I have debugged lots of issues with mixed models over the years by looking at R (and G and V on the RANDOM statement) to see what kind of crazy covariance structure I have (mis)applied to my data.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 12 Sep 2022 18:07:00 GMT</pubDate>
    <dc:creator>StatsMan</dc:creator>
    <dc:date>2022-09-12T18:07:00Z</dc:date>
    <item>
      <title>proc mixed, same number of observations used, different estimates</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-mixed-same-number-of-observations-used-different-estimates/m-p/832776#M41248</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I have a question about proc mixed procedure with some missing outcome values. using same dataset, same model, the two code have the same number of "Number of Observations Used", but very different parameter estimates. I suppose these estimates should be the same. Could anyone help explain why these estimates are different?&amp;nbsp; Thank you in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;code1:&lt;/P&gt;&lt;P&gt;proc mixed data = mydata;&lt;BR /&gt;class id order(ref="0");&lt;BR /&gt;model MS=order group stability /s ;&lt;BR /&gt;repeated / type=un subject=id r rcorr;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Janes1_0-1662920801556.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/75135iFA966B20CB1EF1A5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Janes1_0-1662920801556.png" alt="Janes1_0-1662920801556.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Janes1_1-1662920823879.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/75136iE8DF69B96FE6C1F8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Janes1_1-1662920823879.png" alt="Janes1_1-1662920823879.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&lt;DIV align="center"&gt;&lt;P class="lia-align-left"&gt;Code2 (this code returns the same results as using the where statements in a data step to subset mydata, i.e.. data mydata;set mydata;where MS ne .;run; proc mixed data=mydata;...)&lt;/P&gt;&lt;P class="lia-align-left"&gt;proc mixed data = mydata;&lt;BR /&gt;class id order(ref="0");&lt;BR /&gt;model MS=order group stability /s ;&lt;BR /&gt;repeated / type=un subject=id r rcorr;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;where MS ne .;&lt;/FONT&gt;&lt;BR /&gt;run;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Janes1_2-1662920854543.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/75137iD059CDF9133E2041/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Janes1_2-1662920854543.png" alt="Janes1_2-1662920854543.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Janes1_3-1662920872380.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/75138i0949DC7F9451CCE8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Janes1_3-1662920872380.png" alt="Janes1_3-1662920872380.png" /&gt;&lt;/span&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sun, 11 Sep 2022 18:28:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-mixed-same-number-of-observations-used-different-estimates/m-p/832776#M41248</guid>
      <dc:creator>Janes1</dc:creator>
      <dc:date>2022-09-11T18:28:18Z</dc:date>
    </item>
    <item>
      <title>Re: proc mixed, same number of observations used, different estimates</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-mixed-same-number-of-observations-used-different-estimates/m-p/832880#M41255</link>
      <description>&lt;P&gt;This is the difference seen when comparing an "intent to treat (ITT)" analysis to a "per protocol (PP)" .&amp;nbsp; The first (and your first) uses all of the data to create the matrices needed to solve the mixed model equations, while the second (and your second) uses only those subjects for which the response variable is known.&amp;nbsp; In a repeated measures analysis, the PP method implies that records with a measured response, but a missing value for any of the covariates (fixed or random) will be included in the analysis.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
      <pubDate>Mon, 12 Sep 2022 13:04:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-mixed-same-number-of-observations-used-different-estimates/m-p/832880#M41255</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2022-09-12T13:04:17Z</dc:date>
    </item>
    <item>
      <title>Re: proc mixed, same number of observations used, different estimates</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-mixed-same-number-of-observations-used-different-estimates/m-p/832907#M41257</link>
      <description>&lt;P&gt;You might get the results to agree if you specify your repeated effect on both the CLASS and REPEATED statement. Suppose you have measured subjects over 3 time points. For the first subject, you have a missing response for their 2nd observation. In your first model, you read in all 3 observations and MIXED creates 2 rows in R for the first subject. Because MIXED sees the missing response on the subject's 2nd observation, the rows in R will correspond to the 1st and 3rd observations for the subject. When you remove the missing responses with the WHERE statement, MIXED sees 2 observations for subject 1 (not 3) and creates 2 rows in R for this subject. But these rows correspond now to the 1st and 2nd observations, not the 1st and 3rd.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How to get around all of this? If the variable TIME measures the time point at which the observations are measured, then include TIME on the CLASS statement and before the / on the REPEATED statement.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Sep 2022 14:37:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-mixed-same-number-of-observations-used-different-estimates/m-p/832907#M41257</guid>
      <dc:creator>StatsMan</dc:creator>
      <dc:date>2022-09-12T14:37:02Z</dc:date>
    </item>
    <item>
      <title>Re: proc mixed, same number of observations used, different estimates</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-mixed-same-number-of-observations-used-different-estimates/m-p/832909#M41258</link>
      <description>&lt;P&gt;What&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/92458"&gt;@StatsMan&lt;/a&gt;&amp;nbsp;points out is a solution to a kind of missing that gets overlooked in many cases.&amp;nbsp; This could be even more apparent if a structured covariance matrix was applied - lsmeans and standard errors could be grossly different, rather than slightly different as in the example posted by&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/346745"&gt;@Janes1&lt;/a&gt;&amp;nbsp;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I wish I could apply more than 1 like to the response - this one is pretty profound in its application.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
      <pubDate>Mon, 12 Sep 2022 14:57:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-mixed-same-number-of-observations-used-different-estimates/m-p/832909#M41258</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2022-09-12T14:57:28Z</dc:date>
    </item>
    <item>
      <title>Re: proc mixed, same number of observations used, different estimates</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-mixed-same-number-of-observations-used-different-estimates/m-p/832963#M41259</link>
      <description>&lt;P&gt;Adding the R option to the REPEATED statement will show you the block of R for the first subject. You can specify multiple subject numbers using R=1,2,4,8 to print the block of R for the 1st, 2nd, 4th, and 8th subject. I have debugged lots of issues with mixed models over the years by looking at R (and G and V on the RANDOM statement) to see what kind of crazy covariance structure I have (mis)applied to my data.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Sep 2022 18:07:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-mixed-same-number-of-observations-used-different-estimates/m-p/832963#M41259</guid>
      <dc:creator>StatsMan</dc:creator>
      <dc:date>2022-09-12T18:07:00Z</dc:date>
    </item>
  </channel>
</rss>

