BookmarkSubscribeRSS Feed
bikash10
Calcite | Level 5

Hello,

I have sas code to run the weibull survival model, and is running with out any errors. 

bikash10_0-1650312323456.png

I do have P_1 in my test data. When am trying to score the data, but it popped the warning message. 

bikash10_3-1650312633675.png

The error message is :

bikash10_2-1650312503156.png

I am not sure what's going on. Any suggestions are very helpful to score the data. 

 

Thank you,

Bikash

5 REPLIES 5
sbxkoenk
SAS Super FREQ

Hello,

 

What version of SAS are you using?

Submit :

%PUT &=sysvlong4;

to find out !

 

I believe you are running into a problem described by this problem note :
Problem Note 58685: Incorrect results are generated in the PLM procedure when it uses an item store that is generated by the LIFEREG or RELIABILITY procedures
https://support.sas.com/kb/58/685.html

 

BR,

Koen

bikash10
Calcite | Level 5

I checked the SAS version. It is SAS 9.04 version. 

bikash10_0-1650315486403.png

Thank you for your prompt reply. 

 

Sincerely,

Bikash

sbxkoenk
SAS Super FREQ

Hello,

 

Can you additionally run :

proc product_status; run;

?

 

For me , it says :

1    proc product_status; run;

For Base SAS Software ...
   Custom version information: 9.4_M7
   Image version information: 9.04.01M7P080520
For SAS/STAT ...
   Custom version information: 15.2

The problem note ( https://support.sas.com/kb/58/685.html ) claims this LIFEREG + PLM thing is fixed in SAS/STAT 14.2, but I wonder if that's correct? I think your SAS version (9.4 Maintenance Level 6) comes with SAS/STAT 15.1 (which is later than SAS/STAT 14.2).

 

Let me know ...

 

Thanks,

Koen

bikash10
Calcite | Level 5

I ran this code and got 15.1. Here is the details:

proc product_status; run;

 

bikash10_0-1650319149187.png

Thanks,

Bikash

Reeza
Super User

I generate the same error as you with PROC LIFEREG. 

Time to open a SAS Support ticket. Full code to reproduce is below:

 

title 'Motorette Failures With Operating Temperature as a Covariate';
data motors;
   input time censor temp @@;
   if _N_=1 then
      do;
         temp=130;
         time=.;
         control=1;
         z=1000/(273.2+temp);
         output;
         temp=150;
         time=.;
         control=1;
         z=1000/(273.2+temp);
         output;
      end;
   if temp>150;
   control=0;
   z=1000/(273.2+temp);
   output;
   datalines;
8064 0 150 8064 0 150 8064 0 150 8064 0 150 8064 0 150
8064 0 150 8064 0 150 8064 0 150 8064 0 150 8064 0 150
1764 1 170 2772 1 170 3444 1 170 3542 1 170 3780 1 170
4860 1 170 5196 1 170 5448 0 170 5448 0 170 5448 0 170
 408 1 190  408 1 190 1344 1 190 1344 1 190 1440 1 190
1680 0 190 1680 0 190 1680 0 190 1680 0 190 1680 0 190
 408 1 220  408 1 220  504 1 220  504 1 220  504 1 220
 528 0 220  528 0 220  528 0 220  528 0 220  528 0 220
;
proc print data=motors;
run;

proc lifereg data=motors;
model time*censor(0) = z / dist=lnormal;
store weibull_test;
run;

proc plm restore=weibull_test;
show program;
show parms;
run;

proc plm restore=weibull_test;
score data=motors out=motors_predicted  predicted;
run;

Log:

1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 68         
 69         title 'Motorette Failures With Operating Temperature as a Covariate';
 70         data motors;
 71            input time censor temp @@;
 72            if _N_=1 then
 73               do;
 74                  temp=130;
 75                  time=.;
 76                  control=1;
 77                  z=1000/(273.2+temp);
 78                  output;
 79                  temp=150;
 80                  time=.;
 81                  control=1;
 82                  z=1000/(273.2+temp);
 83                  output;
 84               end;
 85            if temp>150;
 86            control=0;
 87            z=1000/(273.2+temp);
 88            output;
 89            datalines;
 
 NOTE: SAS went to a new line when INPUT statement reached past the end of a line.
 NOTE: The data set WORK.MOTORS has 32 observations and 5 variables.
 NOTE: DATA statement used (Total process time):
       real time           0.00 seconds
       user cpu time       0.00 seconds
       system cpu time     0.00 seconds
       memory              534.62k
       OS Memory           27556.00k
       Timestamp           04/18/2022 10:13:08 PM
       Step Count                        64  Switch Count  2
       Page Faults                       0
       Page Reclaims                     126
       Page Swaps                        0
       Voluntary Context Switches        12
       Involuntary Context Switches      0
       Block Input Operations            0
       Block Output Operations           264
       
 98         ;
 
 99         proc print data=motors;
 100        run;
 
 NOTE: There were 32 observations read from the data set WORK.MOTORS.
 NOTE: PROCEDURE PRINT used (Total process time):
       real time           0.04 seconds
       user cpu time       0.05 seconds
       system cpu time     0.00 seconds
       memory              1197.00k
       OS Memory           27556.00k
       Timestamp           04/18/2022 10:13:08 PM
       Step Count                        65  Switch Count  0
       Page Faults                       0
       Page Reclaims                     70
       Page Swaps                        0
       Voluntary Context Switches        0
       Involuntary Context Switches      10
       Block Input Operations            0
       Block Output Operations           16
       
 
 101        
 102        proc lifereg data=motors;
 103        model time*censor(0) = z ;
 104        store weibull_test;
 105        run;
 
 NOTE: Algorithm converged.
 NOTE: The LIFEREG procedure generated the model item store WORK.WEIBULL_TEST.
 NOTE: PROCEDURE LIFEREG used (Total process time):
       real time           0.05 seconds
       user cpu time       0.05 seconds
       system cpu time     0.00 seconds
       memory              1376.40k
       OS Memory           27816.00k
       Timestamp           04/18/2022 10:13:08 PM
       Step Count                        66  Switch Count  0
       Page Faults                       0
       Page Reclaims                     122
       Page Swaps                        0
       Voluntary Context Switches        0
       Involuntary Context Switches      10
       Block Input Operations            0
       Block Output Operations           224
       
 
 106        
 107        proc plm restore=weibull_test;
 108        show program;
 109        show parms;
 110        run;
 
 NOTE: PROCEDURE PLM used (Total process time):
       real time           0.02 seconds
       user cpu time       0.03 seconds
       system cpu time     0.00 seconds
       memory              561.53k
       OS Memory           27556.00k
       Timestamp           04/18/2022 10:13:08 PM
       Step Count                        67  Switch Count  0
       Page Faults                       0
       Page Reclaims                     59
       Page Swaps                        0
       Voluntary Context Switches        0
       Involuntary Context Switches      2
       Block Input Operations            0
       Block Output Operations           24
       
 
 111        
 112        proc plm restore=weibull_test;
 113        score data=motors out=motors_predicted  predicted;
 114        run;
 
 WARNING: The SCORE statement cannot be used for the specified model.
 NOTE: The data set WORK.MOTORS_PREDICTED has 0 observations and 0 variables.
 WARNING: Data set WORK.MOTORS_PREDICTED was not replaced because new file is incomplete.
 NOTE: PROCEDURE PLM used (Total process time):
       real time           0.01 seconds
       user cpu time       0.01 seconds
       system cpu time     0.00 seconds
       memory              708.34k
       OS Memory           28072.00k
       Timestamp           04/18/2022 10:13:08 PM
       Step Count                        68  Switch Count  0
       Page Faults                       0
       Page Reclaims                     85
       Page Swaps                        0
       Voluntary Context Switches        0
       Involuntary Context Switches      0
       Block Input Operations            0
       Block Output Operations           16
       
 
 115        
 116        OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 126          

Issue appears to be the same as @sbxkoenk identified, SCALE parameter is not stored on the model if you compare the outputs but it does say fixed and this is using a later version of SAS/STAT than indicated in the SAS Note. 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 5 replies
  • 682 views
  • 4 likes
  • 3 in conversation