print '\n' dta = dta.values()[-1] print dta[range(5), :] print '\n' #Create the KaplanMeier object and fit the model km = KaplanMeier(dta, 0) km.fit() #show the results km.plot() print 'basic model' print '\n' km.summary() print '\n' #Mutiple survival curves km2 = KaplanMeier(dta, 0, exog=1) km2.fit() print 'more than one curve' print '\n' km2.summary() print '\n' km2.plot() #with censoring censoring = np.ones_like(dta[:, 0])
print '\n' dta = dta.values()[-1] print dta[range(5),:] print '\n' #Create the KaplanMeier object and fit the model km = KaplanMeier(dta,0) km.fit() #show the results km.plot() print 'basic model' print '\n' km.summary() print '\n' #Mutiple survival curves km2 = KaplanMeier(dta,0,exog=1) km2.fit() print 'more than one curve' print '\n' km2.summary() print '\n' km2.plot() #with censoring censoring = np.ones_like(dta[:,0])