Hello, I am having errors when I run the below code from R documentation. This is the error that I get
"Error in frailtyPenal(Surv(time, event) ~ cluster(id) + sex + dukes + :
unused arguments (kappa1 = 9.55e+09, kappa2 = 1.41e+12, Frailty = TRUE)"
Could you help figure what I am doing wrong?
Thanks
Alfred
R CODE:
install.packages(c(''frailtypack')
library(frailtypack)
data(readmission)
modJoint.gap <- frailtyPenal(Surv(time,event)~cluster(id)+sex+dukes+charlson+
terminal(death),formula.terminalEvent=~sex+dukes+charlson,
data=readmission,n.knots=14,kappa1=9.55e+9,kappa2=1.41e+12,
Frailty=TRUE,joint=TRUE,recurrentAG=FALSE)