turn on suggestions

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

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Stat Procs
- /
- proc genmond and proc nlmixed give the different r...

Topic Options

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

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

03-12-2018 11:25 AM - edited 03-12-2018 11:32 AM

I'm running the following two codes on the attached data and getting two different results. Moreover the results for the Zero inflation do not appear correct. I don't know whether it is a problem with some code or It's a sign that zero inflation is not the best for this data! because even the significance of the Zero inflation estimates is way off from proc nlmixed

```
proc genmod data = bbbb;
model y_c = x1 x2/dist=zip;
zeromodel x1 x2 /link = logit;
run;
/*********************************************************************************************************/
proc nlmixed data=bbbb;
parameters b0=0 b1=0 b2=0
a0=0 a1 = 0 a2=0 ;
linpinfl = a0 + a1*x1 + a2*x2;
infprob = 1/(1+exp(-linpinfl));
lambda = exp(b0 + b1*x1 + b2*x2 );
if y_c=0 then
ll = log(infprob + (1-infprob)*exp(-lambda));
else ll = log((1-infprob)) - lambda + y_c*log(lambda) - lgamma(y_c + 1);
model y_c ~ general(ll);
run;
```

Accepted Solutions

Solution

03-18-2018
04:24 AM

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to john1111

03-13-2018 10:19 AM

All Replies

Solution

03-18-2018
04:24 AM

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to john1111

03-13-2018 10:19 AM

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Rick_SAS

03-14-2018 02:24 AM

Thanks a lot for this idea! I noticed the problem! I messed up the data unknowingly and I didn't realize that I had deleted all the observations with the Zero counts.