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
- /
- multiple random factors in proc nlmixed - SAS 9.3

Topic Options

- Subscribe to 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
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

3 weeks ago

Hello:

I've seen a response to this question posted by Steve Dunham but there were some aspects that were unclear and in addition I was hoping that Steve or someone could make reference to the following code:

*nlmixed model including random factor and zip;

*in reality I have two random factors - bin, which is an indicator of the longitudinal nature of the data (nested under subject ID)

*subject id (ptid) which is the arbitrary identifier within the study;

proc nlmixed data=foo.nlmixed_data;

parms b0=1.35 b1=-.023 b2=-.2466 b3=-.0115 a0=-.2027 a1=.0606 a2=.2426 a3=.0127 sigma2=.0811;

logit0 = a0 + a1*studygroup + a2*treatst + a3*age;

prob0 = 1 / (1 + exp(-logit0));

mu = exp(b0 + u + b1*studygroup + b2*treatst + b3*age);

if count = 0 then *likelihood if no counts - zip;

ll = log(prob0 + (1 - prob0)*exp(-mu));

else *count > 0;

ll = count*log(mu) + log(1 - prob0) -mu -lgamma(count + 1);

model count ~ general(ll);

* here's where I get lost;

*for one random factor the random stmt is ;

random u ~ normal(0, sigma2) subject = bin;

* but for two its more complex;

*bins are nestedwithin subject;

*random u v ~ normal([0,0] [subject_sigma2, cov, bin_sigma2]) subject = bin; *something like this;

run;

I really help somebody can help fill in the missing pieces.

Thanks,

OldSASGuy100

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

3 weeks ago

Support for multiple RANDOM statements was added to PROC NLMIXED In SAS/STAT 13.2, which was shipped with SAS 9.4m2.

SAS 9.3 (from 2011) did not support multiple RANDOM statements.

To see examples and discussion, read Kurada (2016) "Fitting Multilevel Hierarchical Mixed Models Using PROC NLMIXED"

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

3 weeks ago

unfortunately, I don't have access to SAS 13.2, I only have 9.3.

##- Please type your reply above this line. Simple formatting, no

attachments. -##

##- Please type your reply above this line. Simple formatting, no

attachments. -##