Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Home
- /
- Analytics
- /
- Stat Procs
- /
- Multivariate Nonlinear Mixed Model likelihood function help

Options

- RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Posted 02-28-2022 01:55 PM
(550 views)

Hi all,

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:

I try to use logistic nonlinear mixed effect model to fit each response across TU. and assume all the random variables follow

a joint multivariate normal distribution. The SAS code as follows:

```
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;
```

But I do not know how to write the log likelihood function. So, if anyone has any suggestions or could point me towards useful resources that would be great. Thanks a lot.

- Tags:
- Proc nlmixed

2 REPLIES 2

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

It depends on what the distribution is for the response or error terms of the regression model. For an overview, see "Two simple ways to construct a log-likelihood function in SAS."

That article mentions that there are about 25 standard probability distributions that are supported by the LOGPDF function. Additional log-likelihood functions are written in the doc for PROC MCMC.

For an example that uses PROC NLMIXED, see the section "Maximum likelihood estimates for lognormal data" in the article "Two ways to compute maximum likelihood estimates in SAS."

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Hi Rick,

Thank you for your suggestions and resources.

The response (A1, A2) for my data is continuous longitudinal data and

analogous to eqn. (1)-(4), concatenating response vectors of multiple features for individual i results in :

We can assume all the random variables in eqn.(5) follow a joint multivariate normal distribution() to build the multivariate nonlinear mixed model.

thus

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.

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. **Registration is now open through August 30th**. Visit the SAS Hackathon homepage.

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.