Thank you ! I uploaded the data set in attachemnt and here is the final code Libname cls "C:\Users\user\Desktop"; proc import datafile="C:\Users\user\Desktop\book1.csv" OUT= cls.data DBMS=csv REPLACE; GETNAMES=YES; RUN;*Please find the attached csv file; proc nlmixed data=cls.data ; parameters beta0= 2.5 beta1=-0.22 a11= 0.59 a12= -0.11 a22=0.18 alpha0=-1.38 alpha1=0.42 alpha2=21.32 s2=0.03; bounds 0 < a11, a22, s2; *The longitudinal model; linplong = (beta0 + u1) + (beta1 + u2)*time; resid = (y-linplong); if (abs(resid) > 1.3E100) or (s2 < 1e-12) then do; lllong = -1e20; end; else do; lllong = -0.5*(1.837876 + resid**2 / s2 + log(s2)); end; *The logistic model; xb=alpha0+alpha1*u1+alpha2*u2; prob = exp(xb)/(1+exp(xb)); liklhd = (prob**HT)*((1-prob)**(1-HT)); llbin = log(liklhd); model HT ~ general(lllong + llbin); random u1 u2 ~ normal([0, 0],[a11,a12,a22]) subject=id; run; title1;
... View more