dat=sim.chngpt("sigmoid4", type="step", n=200, seed=1, beta=1, alpha=-1, x.distr="norm", e.=4)
fit.1=chngptm(formula.1=y~z, formula.2=~x, family="binomial", dat, type="step", est.method="grid")
print(fit.1)
summary(fit.1)
## Not run:
# # not run because otherwise the examples take >5s and that is a problem for R CMD check
# # has interaction
#
# library(survival)
# test1 <- data.frame(time=c(4,3,1,1,2,2,3),
# status=c(1,1,1,0,1,1,0),
# x=c(0,2,1,1,1,0,0),
# sex=c(0,0,0,0,1,1,1))
# fit=chngptm(formula.1=Surv(time, status)~1, formula.2=~x, data=test1, family="coxph", type="step")
#
# ## End(Not run)
Run the code above in your browser using DataLab