<?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 model not providing individual slope estimates in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Mixed-model-not-providing-individual-slope-estimates/m-p/789843#M38720</link>
    <description>&lt;P&gt;Because the slope variance estimate is zero, you are not going to get the random effect solutions for the subject slopes.&lt;/P&gt;
&lt;P&gt;It is possible that your data does not support the random slope model. A random intercept model might work well.&lt;/P&gt;
&lt;P&gt;Or you might try to rescale your time variable so the values are in a smaller scale, for example, less than 10, to see if that helps with the variance estimate.&lt;/P&gt;
&lt;P&gt;Hope this helps,&lt;/P&gt;
&lt;P&gt;Jill&lt;/P&gt;</description>
    <pubDate>Wed, 12 Jan 2022 22:24:13 GMT</pubDate>
    <dc:creator>jiltao</dc:creator>
    <dc:date>2022-01-12T22:24:13Z</dc:date>
    <item>
      <title>Proc Mixed model not providing individual slope estimates</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Mixed-model-not-providing-individual-slope-estimates/m-p/789740#M38713</link>
      <description>&lt;P&gt;Hello Community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am working with a data set that includes 3 variables: patient ID number (patient_identifier), a self-reported pain score 0-10 (pain_score), and the number of days since the beginning of a treatment that a pain score was obtained (time_pain). I have provided an example of what the data looks like below. Note that pain scores being analyzed are only those that were obtained at a clinic visit during the time that a patient was receiving the treatment. Therefore, a patient who discontinued treatment relatively early will have fewer pain scores than a patient who received treatment longer. The number of pain scores per patient also depends on whether pain was assessed at their appointments. Further, the number of days since the start of treatment that pain was assessed will also vary between patients depending on when they had follow-up appointments.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to obtain subject-specific estimates of pain intercepts and pain-time slopes (to be used as predictor variables of treatment duration in a subsequent model). To obtain the individual estimates of pain intercepts and time slopes, I am using a hierarchical linear model, via PROC MIXED, given that repeated measures of pain scores are nested within individuals. However, the issue is that my current model is not providing estimates for the individual slopes- I have provided my code and Covariance Parameter Estimates output below. Could someone please help with how I might be able to obtain these effects from the model? Any help with this would be much appreciated!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Data input:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Patient_identifier&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Time_pain&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Pain_score&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;001&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;0&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;9&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;001&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;35&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;7&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;001&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;82&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;7&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;001&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;144&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;8&lt;/P&gt;&lt;/TD&gt;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R&gt;&lt;TD&gt;&lt;P&gt;004&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;0&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;0&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;004&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;1&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;0&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;proc mixed data=data_have covtest noclprint method=ML;
class patient_identifier;
model pain_score=time_pain/ solution ddfm = SATTERTHWAITE;
random intercept time_pain/ sub=patient_identifier type=un solution;
ods output solutionr=sr;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="wj2_0-1641999629473.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/67352iB184652707A49F78/image-size/medium?v=v2&amp;amp;px=400" role="button" title="wj2_0-1641999629473.png" alt="wj2_0-1641999629473.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jan 2022 15:01:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Mixed-model-not-providing-individual-slope-estimates/m-p/789740#M38713</guid>
      <dc:creator>wj2</dc:creator>
      <dc:date>2022-01-12T15:01:18Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Mixed model not providing individual slope estimates</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Mixed-model-not-providing-individual-slope-estimates/m-p/789781#M38716</link>
      <description>&lt;P&gt;When I run your example, I get&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;WARNING: Did not converge.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Could you please provide sample data for which your PROC MIXED statements converge?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jan 2022 18:32:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Mixed-model-not-providing-individual-slope-estimates/m-p/789781#M38716</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2022-01-12T18:32:37Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Mixed model not providing individual slope estimates</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Mixed-model-not-providing-individual-slope-estimates/m-p/789785#M38718</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt;&amp;nbsp;thank you for your help! I am not able to provide the data set, however, on my end when I run the program on my full sample (298 subjects, 860 total observations), I am being told that the convergence criteria is actually being met. Below is the actual notification from the log for your reference. It's just that I am getting a value of zero for all the individual random slope estimates. Are you able to provide any suggestions that I could try on my end using the actual data set? Thank you!&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="wj2_0-1642013303021.png" style="width: 822px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/67353iD6E56CAFE3B1BA5E/image-dimensions/822x74?v=v2" width="822" height="74" role="button" title="wj2_0-1642013303021.png" alt="wj2_0-1642013303021.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jan 2022 18:49:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Mixed-model-not-providing-individual-slope-estimates/m-p/789785#M38718</guid>
      <dc:creator>wj2</dc:creator>
      <dc:date>2022-01-12T18:49:54Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Mixed model not providing individual slope estimates</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Mixed-model-not-providing-individual-slope-estimates/m-p/789798#M38719</link>
      <description>&lt;P&gt;I don't doubt that your model converges on your full data. But I am unable to reproduce your issue without sample data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Perhaps someone more familiar with mixed models will be able to help you. Good luck with your problem.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jan 2022 19:43:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Mixed-model-not-providing-individual-slope-estimates/m-p/789798#M38719</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2022-01-12T19:43:24Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Mixed model not providing individual slope estimates</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Mixed-model-not-providing-individual-slope-estimates/m-p/789843#M38720</link>
      <description>&lt;P&gt;Because the slope variance estimate is zero, you are not going to get the random effect solutions for the subject slopes.&lt;/P&gt;
&lt;P&gt;It is possible that your data does not support the random slope model. A random intercept model might work well.&lt;/P&gt;
&lt;P&gt;Or you might try to rescale your time variable so the values are in a smaller scale, for example, less than 10, to see if that helps with the variance estimate.&lt;/P&gt;
&lt;P&gt;Hope this helps,&lt;/P&gt;
&lt;P&gt;Jill&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jan 2022 22:24:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Mixed-model-not-providing-individual-slope-estimates/m-p/789843#M38720</guid>
      <dc:creator>jiltao</dc:creator>
      <dc:date>2022-01-12T22:24:13Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Mixed model not providing individual slope estimates</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Mixed-model-not-providing-individual-slope-estimates/m-p/789855#M38721</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/60873"&gt;@jiltao&lt;/a&gt;&amp;nbsp;Thank you very much for these suggestions! Would you mind providing an example of how the coding might look for these approaches? For example, to try a random intercept model, would the time variable just be left out of the random statement like shown below? So in this case, would it not be possible to obtain a time-slope estimate for each subject?&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;proc mixed data=data_have covtest noclprint method=ML;
class patient_identifier;
model pain_score=time_pain/ solution ddfm = SATTERTHWAITE;
random intercept / sub=patient_identifier type=un solution;
ods output solutionr=sr;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Would you be able to show how rescaling the time variable could be done? The values for the time variable range from about 1-180. Would the dependent variable (pain scores, 0-10) also need to be rescaled if the IV is being rescaled or is this unnecessary?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jan 2022 23:07:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Mixed-model-not-providing-individual-slope-estimates/m-p/789855#M38721</guid>
      <dc:creator>wj2</dc:creator>
      <dc:date>2022-01-12T23:07:56Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Mixed model not providing individual slope estimates</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Mixed-model-not-providing-individual-slope-estimates/m-p/789993#M38726</link>
      <description>&lt;P&gt;Yes, that would be a random intercept model. You will not get subject-specific slope estimate from this model.&lt;/P&gt;
&lt;P&gt;If your time variable has values from 1 to 180, I am not sure if there is an effective way to rescale it to make it to work. If you want to try your luck, you might divide these values by a reasonable constant, for example, 7, 12, or 60, or another value, depending on the unit for the current time variable and the new unit for the time variable that might make sense.&lt;/P&gt;
&lt;P&gt;No you do not need to rescale your dependent variable.&lt;/P&gt;
&lt;P&gt;You might want to plot your data to see if a random intercept and slope model makes sense. Maybe your data does not support this model at all.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jan 2022 14:31:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Mixed-model-not-providing-individual-slope-estimates/m-p/789993#M38726</guid>
      <dc:creator>jiltao</dc:creator>
      <dc:date>2022-01-13T14:31:35Z</dc:date>
    </item>
  </channel>
</rss>

