/* fit the HCV data using the nlinmix macro */ options ps=59 ls=80 nodate; run; data hcv; infile "hcvmix.dat"; input id days vl; run; /* use the results from nlme and nlinmix to get starting values */ proc nlmixed data=hcv; parms beta1=1.5 beta2=1.25 beta3=-0.16 s2b1=0.04 cb12 -0.005 s2b2=0.015 cb13=-0.0008 cb23=0.001 s2b3=0.0004 sig=0.1 theta=1.0; v0=exp(beta1+b1); cc=exp(beta2+b2); e=exp(beta3+b3); t0=0.2; dd=0; if days>t0 then dd=1; tt = dd*(days-t0); pred = v0*(1-e+e*exp(-cc*tt)); var = (sig**2)*(pred**(2*theta)); model vl ~ normal(pred,var); random b1 b2 b3 ~ normal([0,0,0],[s2b1,cb12,s2b2,cb13,cb23,s2b3]) subject=id; run;