In an additive model, the hazard function for the $j^{th}$ subject in the $i^{th}$ trial with random trial effect $u_i$ as well as the random treatment-by-trial interaction $v_i$ is:
$$\lambda_{ij}(t|u_i,v_i)=\lambda_0(t)exp(u_i+v_iX_{ij1}+\sum_{k=1}^{p}\beta_kX_{ijk})$$
$$u_i\sim\bold{\mathcal{N}}(0,\bold{\sigma^2}) \hspace{0.5cm} v_i\sim\bold{\mathcal{N}}(0,\bold{\tau^2})\hspace{0.5cm} \bold{cov}(u_i,v_i)=\bold{\rho\sigma\tau}$$
where $\lambda_0(t)$ is the baseline hazard function, $\beta_k$ the fixed effect associated to the covariate $X_{ijk}$ (k=1,..,p), $\beta_1$ is the treatment effect and $X_{ij1}$ the treatment variable. $\rho$ is the corresponding correlation coefficient for the two frailty terms.
additivePenal(formula, data, correlation = FALSE, recurrentAG =
FALSE, cross.validation = FALSE, n.knots, kappa1,
kappa2, maxit = 350)slope() function is requiredkappa1 (or kappa2), a solutINITIAL VALUES
The splines and the regression coefficients are initialized to 0.1. An adjusted Cox model is fitted, it provides new initial values for the splines coefficients and the regression coefficients. The variances of the frailties are initialized to 0.1. Then an additive frailty model with independent frailties is fitted. At last, an additive frailty model with correlated frailties is fitted.
PARAMETERS LIMIT VALUES
As frailtypack is written in Fortran 77 some parameters had to be hard coded in. The default values of these parameters are, with the corresponding variable name in the fortran code between brackets.
maximum number of observations (ndatemax): 30000 maximum number of groups (ngmax): 1000 maximum number of subjects (nsujetmax): 20000 maximum number of parameters (npmax) :50 maximum number of covariates (nvarmax):50 maximum number of subgroups (nssgmax):5000 If these parameters are not large enough (an error message will let you know this), you need to reset them in additive.f and recompile.
10^{-4})$,>print.additivePenal,
plot.additivePenal,
summary.additivePenal,
cluster,
slope,
strata,
Surv### Additive model with 1 covariate ###
data(dataAdditive)
modAdd<-additivePenal(Surv(t1,t2,event)~cluster(group)+var1+slope(var1),
correlation=TRUE,data=dataAdditive,n.knots=8,kappa1=10000)
# It takes around 4 minutes to converge. Var1 is boolean as a treatment variable. #
print(modAdd)
summary(modAdd)
plot(modAdd)Run the code above in your browser using DataLab