<?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: What reference value is best for classed covariate in proc mixed? Setting it changes log likelih in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/What-reference-value-is-best-for-classed-covariate-in-proc-mixed/m-p/551151#M153112</link>
    <description>&lt;P&gt;Yes, the parameterization effects the parameter estimates, and interpretation gets messy when you have an interaction term, as you do.&lt;/P&gt;
&lt;P&gt;PROC MIXED uses a GLM parameterization. A complete explanation is in the SAS/STAT documentation in the section &lt;A href="https://go.documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_introcom_sect003.htm&amp;amp;docsetVersion=15.1&amp;amp;locale=en" target="_self"&gt;"GLM Parameterization of Classification Variables and Effects."&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As you say, the default reference values is&amp;nbsp;REF=LAST, which corresponds to '6' in your example.&amp;nbsp; PROC MIXED does not support other parameterizations, so, for example, the procedure does not support the PARAM=REF option.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To use the log-likelihood to compare model fits, use the same parameterizations for all models.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 15 Apr 2019 17:39:54 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2019-04-15T17:39:54Z</dc:date>
    <item>
      <title>What reference value is best for classed covariate in proc mixed? Setting it changes log likelihood</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-reference-value-is-best-for-classed-covariate-in-proc-mixed/m-p/550364#M152804</link>
      <description>&lt;P&gt;I am creating a mixed model using proc mixed, and have noticed that the&amp;nbsp;Fit Statistics (AIC and log likelihood) results change depending on the reference values set in the class statement.&amp;nbsp;&lt;SPAN&gt;I am using version 9.4.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, in the Ozone dataset (attached) each subject receives one of two treatments (exposed to regular air or air with ozone added) and has&amp;nbsp;an outcome (FEV1) measured at serval times (0,1,2,3,4,5, and 6). In the table, subjects are identified by the column "ID", exposure is in the "ozone_ind column", where air is 0 and ozone is 1, and time and FEV1 are in "time" and "FEV1" respectively. All measures are formatted as numbers (as opposed to characters).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I run the following code, I get a log-likelihood of 1837.4 and AIC of&amp;nbsp;1841.4&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;data ozone; set ozone; t=time; run;
proc&amp;nbsp;mixed&amp;nbsp;data=ozone&amp;nbsp;method=reml;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;class&amp;nbsp;id t ozone_ind(ref='0');
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;model&amp;nbsp;fev1 = ozone_ind time ozone_ind*time /&amp;nbsp;s&amp;nbsp;ddfm=KENWARDROGER;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;repeated&amp;nbsp;t /&amp;nbsp;type=ar(1)&amp;nbsp;sub=id ;&amp;nbsp;run;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, with a reference option for t,&amp;nbsp;I get a log-likelihood of 1909.6 and AIC of 1913.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data ozone; set ozone; t=time; run;
proc&amp;nbsp;mixed&amp;nbsp;data=ozone&amp;nbsp;method=reml;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;class&amp;nbsp;id t(ref='0') ozone_ind(ref='0');
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;model&amp;nbsp;fev1 = ozone_ind time ozone_ind*time /&amp;nbsp;s&amp;nbsp;ddfm=KENWARDROGER;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;repeated&amp;nbsp;t /&amp;nbsp;type=ar(1)&amp;nbsp;sub=id ;&amp;nbsp;run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I've noticed that I can recreate the result of having no reference value by using&amp;nbsp; t(ref='6').&amp;nbsp;&lt;SPAN&gt;As default,&amp;nbsp;I think SAS uses to the highest value for reference, so it makes sense that specifying t(ref='6') produces the same&amp;nbsp;results as nothing. &lt;/SPAN&gt;&lt;SPAN&gt;Can anyone explain why setting the ref value changes the AIC so much? Intuitively, setting to zero&amp;nbsp;makes sense to me, but it seems to produce a worse fit, but how do I decide the best&amp;nbsp;reference value?&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I saw a similar question was posed &lt;A href="https://communities.sas.com/t5/SAS-Programming/different-results-when-use-reference-option-in-PHREG-class/m-p/536080/highlight/true#M147278" target="_self"&gt;here&lt;/A&gt;, but in regard to proc phreg. Part of the answer there was to use&amp;nbsp;&lt;SPAN&gt;PARAM=REF, but I've never done&amp;nbsp;that with proc mixed, so &lt;/SPAN&gt;&lt;SPAN&gt;I'm not sure if that is&amp;nbsp;&lt;/SPAN&gt;appropriate here or even possible.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Best,&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Joseph V.&lt;/DIV&gt;</description>
      <pubDate>Thu, 11 Apr 2019 18:17:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-reference-value-is-best-for-classed-covariate-in-proc-mixed/m-p/550364#M152804</guid>
      <dc:creator>Josephv</dc:creator>
      <dc:date>2019-04-11T18:17:43Z</dc:date>
    </item>
    <item>
      <title>Re: What reference value is best for classed covariate in proc mixed? Setting it changes log likelih</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-reference-value-is-best-for-classed-covariate-in-proc-mixed/m-p/551151#M153112</link>
      <description>&lt;P&gt;Yes, the parameterization effects the parameter estimates, and interpretation gets messy when you have an interaction term, as you do.&lt;/P&gt;
&lt;P&gt;PROC MIXED uses a GLM parameterization. A complete explanation is in the SAS/STAT documentation in the section &lt;A href="https://go.documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_introcom_sect003.htm&amp;amp;docsetVersion=15.1&amp;amp;locale=en" target="_self"&gt;"GLM Parameterization of Classification Variables and Effects."&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As you say, the default reference values is&amp;nbsp;REF=LAST, which corresponds to '6' in your example.&amp;nbsp; PROC MIXED does not support other parameterizations, so, for example, the procedure does not support the PARAM=REF option.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To use the log-likelihood to compare model fits, use the same parameterizations for all models.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Apr 2019 17:39:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-reference-value-is-best-for-classed-covariate-in-proc-mixed/m-p/551151#M153112</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2019-04-15T17:39:54Z</dc:date>
    </item>
  </channel>
</rss>

