# NOT RUN {
#generate data
set.seed(1234)
dat = sim_dat(n=100, zerof=0, scenario=1)
#fit piecewise constant for alpha=1 and a range of lambda
fit = tfCox(dat, ord=0, alpha=1)
#summarize the fit by the number of knots and percent sparsity achieved.
#Percent sparsity is the percentage of features estimated to have
#no relationship with outcome
summary(fit)
# }
Run the code above in your browser using DataLab