@PGStats
Thanks much for your reply!
I need to write SAS code based on the following code. From the code below, does that mean Newton Raphson iteration is needed? If yes, could you please direct me how to do that? FIY, "try" in the code below is the "try.csv" as in the attachment. Thanks a bunch!
LOOP K = 1 TO 150.
COMPUTE theta_lo={-20}. COMPUTE theta_hi={20}. COMPUTE delta={.000001}. COMPUTE cut={K}. COMPUTE theta={0}. COMPUTE low={theta_lo}. COMPUTE hi={theta_hi}. COMPUTE IPROB=MAKE(NITEM,1,0). COMPUTE IINFO=MAKE(NITEM,1,0).
LOOP.
LOOP J=1 TO NITEM. COMPUTE IPROB(J)=(exp(theta-try(J,2))/(1+exp(theta-try(J,2))))). COMPUTE IINFO(J)=IPROB(J)*(1-IPROB(J)). END LOOP. COMPUTE TCC=CSUM(IPROB).
DO IF (tcc-cut>delta). COMPUTE hi = theta. COMPUTE theta=theta-ABS((theta-low))/2. END IF. DO IF (tcc-cut< (-1*delta)). COMPUTE low=theta. COMPUTE theta=theta+ABS((hi-theta))/2. END IF. END LOOP IF (abs(tcc-cut)<=delta).
... View more