Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Library: hazreg
See also: hazdat hazregll hazbeta hazsurv

Quantlet: hazbase
Description: calculates the baseline hazard and survival function, using the maximum likelihood estimate of the regression parameter beta obatined through hazbeta.

Usage: {bhaz, bsurv} = hazbase(data)
Input:
data n x (p+4) matrix, the first column is the sorted survival time t, followed by the sorted delta, inidcating if censoring has occured, labels l, a column containing the number of ties, and lastly, the sorted covariate matrix z.
Output:
bhaz n x 2 matrix, the first column is the sorted t, followed by the estimated baseline hazard function at the points of t.
bsurv n x 2 matrix, the first column is the sorted t, followed by the estimated baseline survival function at the points of t.

Example:

library("hazreg") 

n = 20

p = 2

beta = 1|2                      ; regression parameter

z = 1 + uniform(n,p)            ; covariates

y = -log(1-uniform(n))          ; exponential survival

y = y./exp(z*beta)              ; covariate effects

c = 4*uniform(n)                ; uniform censoring

t = min(y~c,2)                  ; censored time             

delta = (y<=c)                  ; censoring indicator            

{data,ties} = hazdat(t,delta, z)   ; preparing data

{bhaz,bsurv} = hazbase(data)  

; estimation of the

; baseline hazard and

; survival functions                              

Result:

The baseline hazard and survival functions are 

estimated. 


Library: hazreg
See also: hazdat hazregll hazbeta hazsurv

Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Author: Lijian Yang 990706
(C) MD*TECH Method and Data Technologies, 21.9.2000