|
Chapter Contents |
Previous |
Next |
| The LIFEREG Procedure |
The following artificial data are for a study of the natural recovery time of mice after injection of a certain toxin. 20 mice were grouped by sex (sex: 1 = Male, 2 = Female) with equal sizes. Their ages (in days) were recorded at the injection. Their recovery times (in minutes) were also recorded. Toxin density in blood was used to decide whether a mouse recovered. Mice were checked at two times for recovery. If a mouse had recovered at the first time, the observation is left-censored, and no further measurement is made. The variable time1 is set to missing and time2 is set to the measurement time to indicate left-censoring. If a mouse had not recovered at the first time, it was checked later at a second time. If it had recovered by the second measurement time, the observation is interval-censored and the variable time1 is set to the first measurement time and time2 is set to the second measurement time. If there was no recovery at the second measurement, the observation is right-censored, and time1 is set to the second measurement time and time2 is set to missing to indicate right-censoring.
The following statements create a SAS data set containing the data from the experiment and fit a Weibull model with age, sex, and age and sex interaction as covariates.
title 'Natural Recovery Time';
data mice;
input sex age time1 time2 ;
datalines;
1 57 631 631
1 45 . 170
1 54 227 227
1 43 143 143
1 64 916 .
1 67 691 705
1 44 100 100
1 59 730 .
1 47 365 365
1 74 1916 1916
2 79 1326 .
2 75 837 837
2 84 1200 1235
2 54 . 365
2 74 1255 1255
2 71 1823 .
2 65 537 637
2 33 583 683
2 77 955 .
2 46 577 577
;
data xrow1;
input sex age time1 time2 ;
datalines;
1 50 . .
;
data xrow2;
input sex age time1 time2 ;
datalines;
2 60.6 . .
;
proc lifereg data=mice xdata=xrow1;
class sex ;
model (time1, time2) = age sex age*sex / dist=Weibull;
probplot / nodata
font = swiss
plower=.5
vref(intersect) = 75
vreflab = '75 Percent'
vreflabpos = 2
cfit=blue
cframe=ligr
;
inset / cfill = white
ctext = blue;
run; quit;
Standard output is shown in Output 6.1.1. Tables containing general model information, Type III tests for the main effects and interaction terms, and parameter estimates are created.
Output 6.1.1: Parameter Estimates for the Interaction Model
|
|
|
Chapter Contents |
Previous |
Next |
Top |
Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.