# NOT RUN {
#generate data
set.seed(123)
dat = sim_dat(n=100, zerof=0, scenario=1)
#fit piecewise constant functions
#cross-validation to choose the tuning parameter lambda with fixed alpha=1
cv = cv_tfCox(dat, ord=0, alpha=1, n.fold=2, seed=123)
plot(cv, showSE=TRUE)
# }
Run the code above in your browser using DataLab