The function calculates predicted cumulative hazard and survival curves for given covariate
or linear predictor values; for the first, newdata must be specified and for the latter
lp must be specified. Each row of newdata or element of lp is consiered to be
a different subject, and the desired predictions are produced for each of them separately.
In newdata two columns may be specified with the names tstart and tstop.
In this case, each subject is assumed to be at risk only during the times specified by these two values.
If the two are not specified, the predicted curves are produced for a subject that is at risk for the
whole follow-up time.
A slightly different behaviour is observed if individual == TRUE. In this case, all the rows of
newdata are assumed to come from the same individual, and tstart and tstop must
be specified, and must not overlap. This may be used for describing subjects that
are not at risk during certain periods or subjects with time-dependent covariate values.
The two "quantities" that can be returned are
named cumhaz and survival. If we denote each quantity with q, then the columns with the marginal estimates
are named q_m. The confidence intervals contain the name of the quantity (conditional or marginal) followed by _l or _r for
the lower and upper bound. The bounds calculated with the adjusted standard errors have the name of the regular bounds followed by
_a. For example, the adjusted lower bound for the marginal survival is in the column named survival_m_l_a.
The emfrail only gives the Breslow estimates of the baseline hazard \(\lambda_0(t)\) at the
event time points, conditional on the frailty. Let \(\lambda(t)\) be the baseline hazard for a linear predictor of interest.
The estimated conditional cumulative hazard is then
\(\Lambda(t) = \sum_{s= 0}^t \lambda(s)\). The variance of \(\Lambda(t)\) can be calculated from the (maybe adjusted)
variance-covariance matrix.
The conditional survival is obtained by the usual expression \(S(t) = \exp(-\Lambda(t))\). The marginal survival
is given by
$$\bar S(t) = E \left[\exp(-\Lambda(t)) \right] = \mathcal{L}(\Lambda(t)),$$
i.e. the Laplace transform of the frailty distribution calculated in \(\Lambda(t)\).
The marginal hazard is obtained as $$\bar \Lambda(t) = - \log \bar S(t).$$
The only standard errors that are available from emfrail are those for \(\lambda_0(t)\). From this,
standard errors of \(\log \Lambda(t)\) may be calculated. On this scale, the symmetric confidence intervals are built, and then
moved to the desired scale.