  Semi-competing risks refer to the setting where primary scientific interest
lies in estimation and inference with respect to a non-terminal event, the
occurrence of which is subject to a terminal event. In this paper, we present
the R package SemiCompRisks that provides functions to perform the analysis of
independent/clustered semi-competing risks data under the illness-death
multi-state model. The package allows the user to choose the specification for
model components from a range of options giving users substantial flexibility,
including: accelerated failure time or proportional hazards regression models;
parametric or non-parametric specifications for baseline survival functions;
parametric or non-parametric specifications for random effects distributions
when the data are cluster-correlated; and, a Markov or semi-Markov
specification for terminal event following non-terminal event. While estimation
is mainly performed within the Bayesian paradigm, the package also provides the
maximum likelihood estimation for select parametric models. The package also
includes functions for univariate survival analysis as complementary analysis
tools.
