05-07-2015 12:42 PM
I am using %NLINMIX MACRO to analyze a data set with hierarchical structure and I want to include some variables in the data set as random variables in the model statement, what should I do?
05-07-2015 01:20 PM
Consider posting this in Statistical Procedures.
Also, the NLINMIX macro page helpfully points out that NLMIXED procedure exists as of SAS 8 so you may not need the macro.
The NLMIXED procedure does have the RANDOM statement as well.
05-07-2015 01:30 PM
NLMIXED can handle only one random statement. It cannot handle hierarchical structured data set with multiple random statements.
05-08-2015 11:06 AM
Definitely time for an upgrade to at least SAS/STAT13.2. The documentation now includes Example 70.7 Overdispersion Hierarchical Nonlinear Mixed Model, which fits a two level (animal and sample within animal) hierarchical model.
05-08-2015 03:45 PM
In my analysis using NLINMIX macro, I discovered that when modeling repeated measured data set with hierarchical structure, for example, school within city, city within state and state within region, your RANDOM statement should be expressed as follows:
Class state city school;
model pseudo_y = d_x1 d_x2 ... + cityeffect + stateeffect / noint notest solution cl;
random d_cityeffect / subject=city(state);
random d_stateeffect / subject=state;
a week ago