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 requiredINITIAL VALUES
When an additive model is fitted, at first, a Cox proportional hazards model (without random effects) is fitted with covariates, it provides initial values for the splines coefficients and the regression coefficients. Then, the variance of the random intercept $\sigma^{2}$ is set at 0.25, the variance of the random slope $\bold{\tau^{2}}$ is set at 0.025 and the covariance of these two random terms $(\bold{cov}(u_i,v_i))$ is set at $3.75*10^{-3}$. The last step is then the maximisation of the penalized log-likelihood on all parameters.
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): 15000 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### 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