/* Use the NLINMIX macro to fit the model to the DYME data by solving linear and quadratic estimating equations (under the Gaussian working assumption) */ /* This program uses the newest version of the macro availble on the sas web site */ options ps=55 ls=80 nodate; /* include the macro from file nlinmix.sas */ %inc 'nlinmix_macro.sas' / nosource; /* input the data */ data dyme; infile "dymedat.dat"; input mouse dose birthwt; run; title "Exchangeable working correlation, ML"; %nlinmix(data=dyme, model=%str( predv = exp(b1+b2*dose); ), derivs=%str( d_b1 = exp(b1+b2*dose); d_b2 = dose*exp(b1+b2*dose); wt=1/(predv*predv); ), parms=%str(b1=0.5 b2=-2), stmts=%str( class mouse; model pseudo_birthwt = d_b1 d_b2 / noint notest solution; repeated / subject=mouse type=cs rcorr; weight wt; ), expand=zero, procopt=%str(empirical method=ml) ) title "Exchangeable working correlation, REML"; %nlinmix(data=dyme, model=%str( predv = exp(b1+b2*dose); ), derivs=%str( d_b1 = exp(b1+b2*dose); d_b2 = dose*exp(b1+b2*dose); wt=1/(predv*predv); ), parms=%str(b1=0.5 b2=-2), stmts=%str( class mouse; model pseudo_birthwt = d_b1 d_b2 / noint notest solution; repeated / subject=mouse type=cs rcorr; weight wt; ), expand=zero, procopt=%str(empirical) )