<?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: Multivariate Nonlinear Mixed Model likelihood function help in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Multivariate-Nonlinear-Mixed-Model-likelihood-function-help/m-p/799224#M39307</link>
    <description>&lt;P&gt;It depends on what the distribution is for the response or error terms of the regression model.&amp;nbsp; For an overview, see &lt;A href="https://blogs.sas.com/content/iml/2017/06/12/log-likelihood-function-in-sas.html" target="_self"&gt;"Two simple ways to construct a log-likelihood function in SAS."&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That article mentions that there are about 25 standard probability distributions that are supported by &lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/lefunctionsref/n0gnrobq5pvj79n1k6u8678dqiv8.htm" target="_self"&gt;the LOGPDF function.&lt;/A&gt;&amp;nbsp;Additional log-likelihood functions are written in &lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/statug/statug_mcmc_details17.htm" target="_self"&gt;the doc for PROC MCMC.&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For an example that uses PROC NLMIXED, see the section "Maximum likelihood estimates for lognormal data" in the article &lt;A href="https://blogs.sas.com/content/iml/2017/06/14/maximum-likelihood-estimates-in-sas.html" target="_self"&gt;"Two ways to compute maximum likelihood estimates in SAS."&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 28 Feb 2022 23:21:25 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2022-02-28T23:21:25Z</dc:date>
    <item>
      <title>Multivariate Nonlinear Mixed Model likelihood function help</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Multivariate-Nonlinear-Mixed-Model-likelihood-function-help/m-p/799193#M39304</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using PROC NLMIXED to generate a multivariate nonlinear mixed-effects model. I have two continuous longitudinal response (A1,A2). I attached the data sample here:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2022-02-28 at 12.48.43.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/69011iD77393932282541C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screen Shot 2022-02-28 at 12.48.43.png" alt="Screen Shot 2022-02-28 at 12.48.43.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I try to use logistic nonlinear mixed effect model to fit each response across TU. and assume all the random variables follow&lt;/P&gt;&lt;P class=""&gt;a joint multivariate normal distribution. The SAS code as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;proc nlmixed data = data1 method = gauss gconv = 0;
parms b1l=190 b2l=700 b3l=350 s2u1l=1000 s2el=60 s2u2l=1000 
b1k=190 b2k=700 b3k=350 s2u1k=1000 s2u2k=1000 s2ek=60 cov_u1lk cov_u2lk;
pi = arcos(-1);
num1 = b1l+u1l;
ex1 = exp(-(TU -(b2l + u2l))/b3l);
den1 = 1 + ex1;
num2 = b1k+u1k;
ex2 = exp(-(TU -(b2k + u2k))/b3k);
den2 = 1 + ex2;
if variable = "A1" then predv = num1/den1;
else if variable = "A2" then predv = num2/den2;
/*here I need to write down the log likelihood function (ll)*/
model value ~ general(ll);
random u1l u2l u1k u2k ~ normal([0,0,0,0],[s2u1l,0,s2u2l,cov_u1lk,0,s2u1k,0,cov_u2lk,0,s2u2k]) subject=ID;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;But I do not know how to write the log likelihood function.&amp;nbsp;&lt;SPAN&gt;So, if anyone has any suggestions or could point me towards useful resources that would be great. Thanks a lot.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Feb 2022 18:55:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Multivariate-Nonlinear-Mixed-Model-likelihood-function-help/m-p/799193#M39304</guid>
      <dc:creator>justine1</dc:creator>
      <dc:date>2022-02-28T18:55:02Z</dc:date>
    </item>
    <item>
      <title>Re: Multivariate Nonlinear Mixed Model likelihood function help</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Multivariate-Nonlinear-Mixed-Model-likelihood-function-help/m-p/799224#M39307</link>
      <description>&lt;P&gt;It depends on what the distribution is for the response or error terms of the regression model.&amp;nbsp; For an overview, see &lt;A href="https://blogs.sas.com/content/iml/2017/06/12/log-likelihood-function-in-sas.html" target="_self"&gt;"Two simple ways to construct a log-likelihood function in SAS."&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That article mentions that there are about 25 standard probability distributions that are supported by &lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/lefunctionsref/n0gnrobq5pvj79n1k6u8678dqiv8.htm" target="_self"&gt;the LOGPDF function.&lt;/A&gt;&amp;nbsp;Additional log-likelihood functions are written in &lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/statug/statug_mcmc_details17.htm" target="_self"&gt;the doc for PROC MCMC.&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For an example that uses PROC NLMIXED, see the section "Maximum likelihood estimates for lognormal data" in the article &lt;A href="https://blogs.sas.com/content/iml/2017/06/14/maximum-likelihood-estimates-in-sas.html" target="_self"&gt;"Two ways to compute maximum likelihood estimates in SAS."&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Feb 2022 23:21:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Multivariate-Nonlinear-Mixed-Model-likelihood-function-help/m-p/799224#M39307</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2022-02-28T23:21:25Z</dc:date>
    </item>
    <item>
      <title>Re: Multivariate Nonlinear Mixed Model likelihood function help</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Multivariate-Nonlinear-Mixed-Model-likelihood-function-help/m-p/799496#M39329</link>
      <description>&lt;P&gt;Hi Rick,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your suggestions and resources.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The response (A1, A2) for my data is continuous longitudinal data and&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2022-03-01 at 22.05.52.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/69049i03BF38543D313755/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screen Shot 2022-03-01 at 22.05.52.png" alt="Screen Shot 2022-03-01 at 22.05.52.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="Screen Shot 2022-03-01 at 22.05.58.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/69050i7FC807569527E77F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screen Shot 2022-03-01 at 22.05.58.png" alt="Screen Shot 2022-03-01 at 22.05.58.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;analogous to eqn. (1)-(4), concatenating response vectors of multiple features for individual i results in :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2022-03-01 at 22.37.35.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/69056iA3BDB7407B61BAA8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screen Shot 2022-03-01 at 22.37.35.png" alt="Screen Shot 2022-03-01 at 22.37.35.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; We can&amp;nbsp;assume all the random variables in eqn.(5) follow a joint multivariate normal distribution(&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2022-03-01 at 22.16.15.png" style="width: 83px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/69052i853F1242F0EF62DB/image-dimensions/83x32?v=v2" width="83" height="32" role="button" title="Screen Shot 2022-03-01 at 22.16.15.png" alt="Screen Shot 2022-03-01 at 22.16.15.png" /&gt;&lt;/span&gt;) to build the multivariate nonlinear mixed model.&amp;nbsp;&lt;/P&gt;&lt;P&gt;thus&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2022-03-01 at 22.19.35.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/69055i1136A313DA80E993/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screen Shot 2022-03-01 at 22.19.35.png" alt="Screen Shot 2022-03-01 at 22.19.35.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; Based on eqn. (7) we can get the log likelihood function. However, how to write the variance in eqn. (7). Could you give me some suggestions? Thanks.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Wed, 02 Mar 2022 04:38:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Multivariate-Nonlinear-Mixed-Model-likelihood-function-help/m-p/799496#M39329</guid>
      <dc:creator>justine1</dc:creator>
      <dc:date>2022-03-02T04:38:46Z</dc:date>
    </item>
  </channel>
</rss>

