Internal function to estimate the starting values for the EM algorithm for the survival sub-model
survst(survdat, surv.formula, survdat2, strat, study.name = NULL)the survival data with factors and interaction terms expanded, ordered by increasing survival time
a formula object with the survival time, censoring
indicator and the covariates to include in the survival sub-model. The
response must be a survival object as returned by the
Surv function.
the survival data with original variables (factors and interaction terms not expanded), ordered by increasing survival time
logical value: if TRUE then the survival sub-model is
calculated with a baseline stratified by study. Otherwise baseline is
unstratified
a character string denoting the name of the variable in the
baseline dataset in data holding study membership, for example
study.name = 'study'.
A list of the results from the initial survival fit is returned. This list contains the following elements:
beta2a vector of the estimated coefficients for fixed
effects included in the survival sub-model. If there are no fixed effects
included in the survival sub-model then this returns NULL
hazthe estimate of the baseline hazard estimated from the
separate survival model. If strat = TRUE then this is a list of
length equal to the number of studies in the dataset, each element of which
is a vector of length equal to the number of events in each study. If
strat = FALSE then this is a vector of length equal to the number of
events in the entire dataset.
rsthe number of events that have occured by the individual
in question's survival time. If strat = TRUE then this is a list of
length equal to the number of studies in the dataset, each element of which
is a vector of length equal to the number of individuals in each study. If
strat = FALSE then this is a vector of length equal to the number of
individuals in the entire dataset.
sfthe survival times where at least one event was observed.
If strat = TRUE then this is a list of length equal to the number of
studies in the dataset, each element of which is a vector of length equal
to the number of events in each study. If strat = FALSE then this is
a vector of length equal to the number of events in the entire dataset.
nevthe number of events that occur at each unique event
time. If strat = TRUE then this is a list of length equal to the
number of studies in the dataset, each element of which is a vector of
length equal to the number of events in each study. If strat = FALSE
then this is a vector of length equal to the number of events in the entire
dataset.
log.like.survthe value of the log-likelihood from the separate survival analysis
modelfitthe initial survival model fit, fitted using the
coxph function from the
survival package.