<?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: Repeated measures using proc mixed, but the data is non-normal in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Repeated-measures-using-proc-mixed-but-the-data-is-non-normal/m-p/906753#M45031</link>
    <description>&lt;P&gt;Thank you for the reply. My data is not just 6 data points, I just want to show the format of the data. Also the outcome itself is not normal at all, and I also tried to check the distribution of the residual, it is not normal also. If I want to use non-parametric, I don't think it can test sex at the same time, right?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 07 Dec 2023 17:21:11 GMT</pubDate>
    <dc:creator>SAS-questioner</dc:creator>
    <dc:date>2023-12-07T17:21:11Z</dc:date>
    <item>
      <title>Repeated measures using proc mixed, but the data is non-normal</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Repeated-measures-using-proc-mixed-but-the-data-is-non-normal/m-p/906561#M45017</link>
      <description>&lt;P&gt;I tried to conducted a repeated measure using proc mixed with below data:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ID    sex  time   outcome
1      F     1       30
1      F     2       23
2      M     1       23
2      M     2       22
3      M     1       12
3      M     2       34&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The group is unbalanced, and each person was measured twice with two different time points. I could use paired t test, but I also need to compare gender, so I used the proc mixed to test the model&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc mixed data=have;
class times sex;
model outcome=sex|time/ solution CL residual outp=predresid;
repeated time/subject=id type=un;
run;

proc univariate normal plot data=predresid;
var resid;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;However, the residual was not normal after fitting the model. What test should I use for this kind of situation? I looked up online, someone said I should use Friedman's test, but the example code seems used 'ID' as block, and their code are pretty much like:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC FREQ DATA=have;
TABLES id*time*outcome / CMH2 SCORES=RANK NOPRINT;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But I still have sex to be tested, can I put like id*time*sex*outcome, or there are something else that I can use? Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 06 Dec 2023 18:29:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Repeated-measures-using-proc-mixed-but-the-data-is-non-normal/m-p/906561#M45017</guid>
      <dc:creator>SAS-questioner</dc:creator>
      <dc:date>2023-12-06T18:29:13Z</dc:date>
    </item>
    <item>
      <title>Re: Repeated measures using proc mixed, but the data is non-normal</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Repeated-measures-using-proc-mixed-but-the-data-is-non-normal/m-p/906647#M45021</link>
      <description>Since your Y variable is positive , you could try POSSION or GAMMA distribution.&lt;BR /&gt;Check   &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15363"&gt;@SteveDenham&lt;/a&gt;   comment here:&lt;BR /&gt;&lt;A href="https://communities.sas.com/t5/Statistical-Procedures/What-analysis-would-work/m-p/906450#M45009" target="_blank"&gt;https://communities.sas.com/t5/Statistical-Procedures/What-analysis-would-work/m-p/906450#M45009&lt;/A&gt;</description>
      <pubDate>Thu, 07 Dec 2023 05:07:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Repeated-measures-using-proc-mixed-but-the-data-is-non-normal/m-p/906647#M45021</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2023-12-07T05:07:31Z</dc:date>
    </item>
    <item>
      <title>Re: Repeated measures using proc mixed, but the data is non-normal</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Repeated-measures-using-proc-mixed-but-the-data-is-non-normal/m-p/906649#M45022</link>
      <description>"the residual was not normal after fitting the model. "&lt;BR /&gt;What reason do you trust the residual after fitting model should conform normal distribution ?&lt;BR /&gt;I think if the model fitted properly ,the residual should look like random distribution or uniform distribution , since the effects have been absorbed by  model.</description>
      <pubDate>Thu, 07 Dec 2023 05:17:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Repeated-measures-using-proc-mixed-but-the-data-is-non-normal/m-p/906649#M45022</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2023-12-07T05:17:25Z</dc:date>
    </item>
    <item>
      <title>Re: Repeated measures using proc mixed, but the data is non-normal</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Repeated-measures-using-proc-mixed-but-the-data-is-non-normal/m-p/906726#M45028</link>
      <description>&lt;P&gt;Two part answer here. First a reply to&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;: After fitting a model, the residuals may or may not be normal (Gaussian). For example, if you fit binomial data without accounting for the distribution with a link function, the residuals will not look Gaussian (it might take a lot of data). Second a reply to&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/376504"&gt;@SAS-questioner&lt;/a&gt;&amp;nbsp;: If you only have 6 data points, why are you bothering to fit a model? The mixed model or GEE model parameters will have such large standard errors you probably won't be able to correctly infer from them.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
      <pubDate>Thu, 07 Dec 2023 15:57:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Repeated-measures-using-proc-mixed-but-the-data-is-non-normal/m-p/906726#M45028</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2023-12-07T15:57:09Z</dc:date>
    </item>
    <item>
      <title>Re: Repeated measures using proc mixed, but the data is non-normal</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Repeated-measures-using-proc-mixed-but-the-data-is-non-normal/m-p/906753#M45031</link>
      <description>&lt;P&gt;Thank you for the reply. My data is not just 6 data points, I just want to show the format of the data. Also the outcome itself is not normal at all, and I also tried to check the distribution of the residual, it is not normal also. If I want to use non-parametric, I don't think it can test sex at the same time, right?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Dec 2023 17:21:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Repeated-measures-using-proc-mixed-but-the-data-is-non-normal/m-p/906753#M45031</guid>
      <dc:creator>SAS-questioner</dc:creator>
      <dc:date>2023-12-07T17:21:11Z</dc:date>
    </item>
    <item>
      <title>Re: Repeated measures using proc mixed, but the data is non-normal</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Repeated-measures-using-proc-mixed-but-the-data-is-non-normal/m-p/906756#M45032</link>
      <description>Thank you for the reply! My my data is not count, maybe I can try GAMMA distribution, but will the interpretation of the result the same as normal distribution?</description>
      <pubDate>Thu, 07 Dec 2023 17:23:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Repeated-measures-using-proc-mixed-but-the-data-is-non-normal/m-p/906756#M45032</guid>
      <dc:creator>SAS-questioner</dc:creator>
      <dc:date>2023-12-07T17:23:39Z</dc:date>
    </item>
    <item>
      <title>Re: Repeated measures using proc mixed, but the data is non-normal</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Repeated-measures-using-proc-mixed-but-the-data-is-non-normal/m-p/906800#M45034</link>
      <description>&lt;P&gt;Question (actually a trick question) - how do you know that the distribution for residuals is not normal? Did you do some sort of test? There are well-known issues with almost every hypothesis test for normality (overpowered with N greater than about 40, underpowered for N less than about 15), and the linear mixed model is remarkably robust to the assumption of normality of the residuals, so long as the empirical distribution is mono-modal, not truncated, and lacks extremely large absolute values. The mono-modal basically boils down to sex differences.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So here are some ways to attack the issue, from simple to complex:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;bin your responses to four or five categories and consider using Cochran-Mantel-Haenszel methods where you stratify by sex.&lt;/LI&gt;
&lt;LI&gt;Plot your data and see what the shape looks like. From that, use a generalized linear model, assuming the distribution you have a picture of. If you have what might be considered random effects, use a generalized linear mixed model.&lt;/LI&gt;
&lt;LI&gt;Bootstrap your data. Simulate a lot of datasets that could possibly occur based on your current data.&lt;/LI&gt;
&lt;LI&gt;Use a Bayesian analysis with noninformative priors. This does a lot better job of simulating the data needed to construct credible intervals as you can include correlations over time or clusters. I don't think you have any random effects, so a good start on this can be found by looking through the documentation for PROC BGLIMM.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;Given what you have done so far, I would recommend #4. You can use most of your PROC MIXED code, and you can examine each distribution/link to see which best fits your data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
      <pubDate>Thu, 07 Dec 2023 18:42:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Repeated-measures-using-proc-mixed-but-the-data-is-non-normal/m-p/906800#M45034</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2023-12-07T18:42:37Z</dc:date>
    </item>
  </channel>
</rss>

