HEX
Server: Apache/2.4.46 (Win64) OpenSSL/1.1.1j PHP/8.4.25
System: Windows NT DESKTOP-4TAV2RJ 10.0 build 19045 (Windows 10) AMD64
User: fred (0)
PHP: 8.4.25
Disabled: NONE
Upload Files
File: C:/Program Files/R/R-4.4.0/library/survival/tests/fr_cancer.R
options(na.action=na.exclude) # preserve missings
options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
library(survival)

#
# Here is a test case with multiple smoothing terms
#

fit0 <- coxph(Surv(time, status) ~ ph.ecog + age, lung)
fit1 <- coxph(Surv(time, status) ~ ph.ecog + pspline(age,3), lung)
fit2 <- coxph(Surv(time, status) ~ ph.ecog + pspline(age,4), lung)
fit3 <- coxph(Surv(time, status) ~ ph.ecog + pspline(age,8), lung)



fit4 <- coxph(Surv(time, status) ~ ph.ecog + pspline(wt.loss,3), lung)

fit5 <-coxph(Surv(time, status) ~ ph.ecog + pspline(age,3) + 
	     pspline(wt.loss,3), lung)

fit1
fit2
fit3
fit4
fit5

rm(fit1, fit2, fit3, fit4, fit5)