/*================================================================= Duration Models */================================================================= Read ; Nobs = 22 ; nvar = 4 ; Names = 1 ; Byvar $ Time Status Sex Jobtype 11 3 19 32 2 14 8 21 16 5 2 8 14 18 18 21 10 1 9 23 19 7 1 1 0 1 1 1 1 1 0 1 1 1 1 1 1 1 0 1 0 1 1 1 0 0 1 0 1 0 1 1 1 0 0 1 1 0 1 1 0 0 1 1 0 1 1 1 2 2 1 1 1 1 2 2 2 1 1 1 2 1 2 2 1 1 2 1 /*================================================================= 1. Nonparametric Life Table (no covariates) */================================================================= SURVIVAL ; lhs = Time, Status ? Status = 0 for censored, 1 = exited ; list $ SURVIVAL ; lhs = Time, Status ? Status = 0 for censored, 1 = exited ; plot$ /*================================================================= 2. Nonparametric life table and homogeneous test */================================================================= SURVIVAL ; lhs = Time, Status ? Status = 0 for censored, 1 = exited ; str = Jobtype ? str = strata indicator; homogeneous test ; list $ /*================================================================= 3. Semiparametric Cox's Proportional Hazard Model (with Covariates) */================================================================= SURVIVAL ; lhs = Time, Status ? Status = 0 for censored, 1 = exited ; rhs = sex ? rhs = covariates for Cox Proportional Model ? ; plot ; list $ SURVIVAL ; lhs = Time, Status ? Status = 0 for censored, 1 = exited ; rhs = sex ; str = Jobtype ; list $ /*================================================================= 4. Log-linear Parametric Hazard Models */================================================================= Create ; logt = log(Time) $ SURVIVAL ; lhs = logt, Status ? Status = 0 for censored, 1 = exited ; rhs = one, sex ; Model = Weibull ? ; plot ; list $ SURVIVAL ; lhs = logt, Status ? Status = 0 for censored, 1 = exited ; rhs = one, sex ; Model = Weibull ? ; plot ; list $ SURVIVAL ; lhs = logt, Status ? Status = 0 for censored, 1 = exited ; rhs = one, sex ; Model = normal ? ; plot ; list $ SURVIVAL ; lhs = logt, Status ? Status = 0 for censored, 1 = exited ; rhs = one, sex ; Model = logistic ? ; plot ; list $