I keep on getting the following "ERROR: (execution) Matrix has not been set to a value." my understanding is that "q" is undefined but it is well defined!!
seems that I don't understand what is the issue exactly? I need your help, please !!!
The log tells you the line that contains the error and what the error is. On Line 217 (which is X_1_q=J(q,1,0);) the value q is undefined. The J function requires that the number of rows and columns be positive.
Notice that the loop that defines q only assigns a value if a certain logical condition is satisfied. Otherwise, q is not defined.
DO idx=1 to m-1;
if (( X_p[idx] < T) & (X_p[idx+1] >= T)) then q=idx; /* <== not defnd if condition false */
T in my case represents the terminal time (time to finish the study) while X represents the failure times (X1,...,Xn). I am looking for m failures. So either I get these m failures before the time T (that is why I have the condition T>= Xm) if not then T is between two times. That is why the ( Bin ) suggestion won't work in my case.
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.
Find more tutorials on the SAS Users YouTube channel.