<?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: Applying linear mixed model where the dependent variable is skewed in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Applying-linear-mixed-model-where-the-dependent-variable-is/m-p/134502#M7027</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No.&amp;nbsp; The ILINK for dist=lognormal retains values on the transformed scale, because you are modeling the log values as a normal random variable.&amp;nbsp; To get estimates on the original scale, check out the documentation for the MODEL statement. DIST options, and you will see a section that starts out "When you choose DIST=LOGNORMAL..."&amp;nbsp; There are equations for the expected value on the original scale, the variance on the original scale, and the everpopular omega.&amp;nbsp; I use the Estimate value as mu and the squared StdErr value as sigma squared to get back to the original scale.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try it and see... (sound like a drug pusher there).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now for a model that assumes that the error is multiplicative (constant CV), dist=normal link=log, followed by ILINK in the lsmeans statement.&amp;nbsp; Slightly different approach, and may be more appropriate to your data. This will return geometric means on the original scale.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve Denham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 24 Jul 2014 18:42:49 GMT</pubDate>
    <dc:creator>SteveDenham</dc:creator>
    <dc:date>2014-07-24T18:42:49Z</dc:date>
    <item>
      <title>Applying linear mixed model where the dependent variable is skewed</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Applying-linear-mixed-model-where-the-dependent-variable-is/m-p/134497#M7022</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; color: #000000; font-size: 12pt;"&gt;Hi SAS Community,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; color: #000000; font-size: 12pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; color: #000000; font-size: 12pt;"&gt;I have a repeated measures study design where the dependent variable is calorie and the independent variables are day and disease severity. An example of the person-time dataset is shown below:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; color: #000000; font-size: 12pt;"&gt;Subject Calorie&amp;nbsp; Day&amp;nbsp; Disease_severity&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; color: #000000; font-size: 12pt;"&gt;1&amp;nbsp; 1000&amp;nbsp; 1&amp;nbsp; Mild&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; color: #000000; font-size: 12pt;"&gt;1&amp;nbsp; 1200&amp;nbsp; 2&amp;nbsp; Mild&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; color: #000000; font-size: 12pt;"&gt;1&amp;nbsp; 900&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&amp;nbsp; Mild&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; color: #000000; font-size: 12pt;"&gt;2&amp;nbsp; 1800&amp;nbsp; 1&amp;nbsp; Moderate&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; color: #000000; font-size: 12pt;"&gt;2&amp;nbsp; 1600&amp;nbsp; 2&amp;nbsp; Moderate&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; color: #000000; font-size: 12pt;"&gt;2&amp;nbsp; 1700&amp;nbsp; 3&amp;nbsp; Moderate&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; color: #000000; font-size: 12pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; color: #000000; font-size: 12pt;"&gt;Since measures from the same subject are auto-correlated, I want to apply linear mixed model with day and disease severity as the independent variable, calories as the dependent variable and specifying a repeated statement for days. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: arial, helvetica, sans-serif; font-size: 12pt;"&gt;proc mixed data=have;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: arial, helvetica, sans-serif; font-size: 12pt;"&gt;title 'mixed model';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: arial, helvetica, sans-serif; font-size: 12pt;"&gt;class subject day disease_severity;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: arial, helvetica, sans-serif; font-size: 12pt;"&gt;model calorie=day disease_severity;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: arial, helvetica, sans-serif; font-size: 12pt;"&gt;repeated day/subject=subject type=un;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: arial, helvetica, sans-serif; font-size: 12pt;"&gt;lsmeans day;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: arial, helvetica, sans-serif; font-size: 12pt;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; color: #000000; font-size: 12pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: #000000; font-family: arial, helvetica, sans-serif; font-size: 12pt;"&gt;The issue is that the dependent variable is nonnormal and the measures of central tendency (mean vs median) are very different. Given the distribution, is it worth considering generalized linear mixed model. My understanding is that in generalized linear models the dependent variables can result in residuals that are normally distributed. I have three questions:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: #000000; font-family: arial, helvetica, sans-serif; font-size: 12pt;"&gt;1. How can I evaluate if the dependent variable residual is nonnormal?&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: #000000; font-family: arial, helvetica, sans-serif; font-size: 12pt;"&gt;2. If generalized linear mixed model is appropriate, what distribution does the errors follow in this case? Is the error in this case part of the exponential family?&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: #000000; font-family: arial, helvetica, sans-serif; font-size: 12pt;"&gt;3. Should I consider other approaches such as quintile regression?&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: #000000; font-family: arial, helvetica, sans-serif; font-size: 12pt;"&gt;As always, your help is much appreciated!&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: #000000; font-family: arial, helvetica, sans-serif; font-size: 12pt;"&gt;Best,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: #000000; font-family: arial, helvetica, sans-serif; font-size: 12pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: #000000; font-family: arial, helvetica, sans-serif; font-size: 12pt;"&gt;Pronabesh&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Times New Roman', serif; color: black;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jul 2014 03:12:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Applying-linear-mixed-model-where-the-dependent-variable-is/m-p/134497#M7022</guid>
      <dc:creator>pronabesh</dc:creator>
      <dc:date>2014-07-24T03:12:21Z</dc:date>
    </item>
    <item>
      <title>Re: Applying linear mixed model where the dependent variable is skewed</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Applying-linear-mixed-model-where-the-dependent-variable-is/m-p/134498#M7023</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you looked at the residuals in a plot?&amp;nbsp; The ODS graphics in MIXED are pretty rich, and ought to give some hints.&amp;nbsp; There is a possiblity that the residuals are multimodal, indicating that the variability differs by disease_severity.&amp;nbsp; What happens if you fit:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; color: #000000; font-size: 12pt;"&gt;proc mixed data=have;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; color: #000000; font-size: 12pt;"&gt;title 'mixed model';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; color: #000000; font-size: 12pt;"&gt;class subject day disease_severity;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; color: #000000; font-size: 12pt;"&gt;model calorie=day|disease_severity; /* Changed to a factorial as the progression in time may differ by disease_severity */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; color: #000000; font-size: 12pt;"&gt;repeated day/subject=subject type=un group=disease_severity; /* Fits separate covariances by disease_severity */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; color: #000000; font-size: 12pt;"&gt;lsmeans day;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; color: #000000; font-size: 12pt;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;If you have to move to a generalized model, a likely candidate for the distribution is lognormal, or possibly normal with a multiplicative error (link=log in GLIMMIX terms).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GLIMMIX only fits exponential family distributions, so that should not be a major concern.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve Denham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jul 2014 13:18:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Applying-linear-mixed-model-where-the-dependent-variable-is/m-p/134498#M7023</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2014-07-24T13:18:16Z</dc:date>
    </item>
    <item>
      <title>Re: Applying linear mixed model where the dependent variable is skewed</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Applying-linear-mixed-model-where-the-dependent-variable-is/m-p/134499#M7024</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Steve,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As always thank you for your advice. I used your suggested full factorial model with separate co-variances by disease_severity. The residual diagnostics is shown below. The distribution is negatively skewed as I expected. &lt;/P&gt;&lt;P&gt;I will also explore the fit statistics using two other approach:&lt;/P&gt;&lt;P&gt;1. Lognormal distribution as you suggested&lt;/P&gt;&lt;P&gt;2. Using multilevel model where disease_severity is a hierarchical level.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note, the dependent variable here is step instead of calories, but the overall model is conceptually the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;More to follow............&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;IMG __jive_id="6880" alt="ResidualPanel.png" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/6880_ResidualPanel.png" width="450" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jul 2014 16:09:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Applying-linear-mixed-model-where-the-dependent-variable-is/m-p/134499#M7024</guid>
      <dc:creator>pronabesh</dc:creator>
      <dc:date>2014-07-24T16:09:41Z</dc:date>
    </item>
    <item>
      <title>Re: Applying linear mixed model where the dependent variable is skewed</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Applying-linear-mixed-model-where-the-dependent-variable-is/m-p/134500#M7025</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The histogram and residual plots scream log normal to me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve Denham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jul 2014 18:24:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Applying-linear-mixed-model-where-the-dependent-variable-is/m-p/134500#M7025</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2014-07-24T18:24:23Z</dc:date>
    </item>
    <item>
      <title>Re: Applying linear mixed model where the dependent variable is skewed</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Applying-linear-mixed-model-where-the-dependent-variable-is/m-p/134501#M7026</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Steve.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I presume using a log normal distribution with link=log&amp;nbsp; requires adding an ilink statement to the lsmeans to get the estimated marginal means. Is my assumption correct?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jul 2014 18:30:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Applying-linear-mixed-model-where-the-dependent-variable-is/m-p/134501#M7026</guid>
      <dc:creator>pronabesh</dc:creator>
      <dc:date>2014-07-24T18:30:47Z</dc:date>
    </item>
    <item>
      <title>Re: Applying linear mixed model where the dependent variable is skewed</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Applying-linear-mixed-model-where-the-dependent-variable-is/m-p/134502#M7027</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No.&amp;nbsp; The ILINK for dist=lognormal retains values on the transformed scale, because you are modeling the log values as a normal random variable.&amp;nbsp; To get estimates on the original scale, check out the documentation for the MODEL statement. DIST options, and you will see a section that starts out "When you choose DIST=LOGNORMAL..."&amp;nbsp; There are equations for the expected value on the original scale, the variance on the original scale, and the everpopular omega.&amp;nbsp; I use the Estimate value as mu and the squared StdErr value as sigma squared to get back to the original scale.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try it and see... (sound like a drug pusher there).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now for a model that assumes that the error is multiplicative (constant CV), dist=normal link=log, followed by ILINK in the lsmeans statement.&amp;nbsp; Slightly different approach, and may be more appropriate to your data. This will return geometric means on the original scale.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve Denham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jul 2014 18:42:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Applying-linear-mixed-model-where-the-dependent-variable-is/m-p/134502#M7027</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2014-07-24T18:42:49Z</dc:date>
    </item>
  </channel>
</rss>

