{'fraction_non_alphanumeric': 0.04316654219566841, 'fraction_numerical': 0.0070201643017177, 'mean_word_length': 4.863397548161121, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Brief introduction to parametric time to event model

This tutorial explains the basic concept of parametric time to event (TTE) models, focusing on commonly used exponential, Weibull, and log-logistic model. TTE data is commonly used as endpoint for treatment effect of a drug or prognosis of diseases. Although non-parametric Kaplan-Meier analysis has been widely used for TTE data analysis, parametric modeling analysis has its own advantages such as ease of simulation, and evaluation of continuous covariate. Accelerated failure time model is introduced as a covariate model for TTE data together with proportional hazard model. Compared to proportional hazard model, accelerated failure time model provides more intuitive results on covariate effect since it states that covariates change TTE whereas in proportional hazard model covariates affect hazard.


INTRODUCTION
Time to event (TTE) data, known generically as survival data in statistics are widely used data type to describe prognosis of diseases or drug effect such as overall survival, progression free survival, time to disease progression, and time to vomit so on. TTE data are unique in that they have time information regarding when an event occurred as well as whether the event occurred or not.
The Kaplan-Meier analysis, is a non-parametric method for TTE data [1]. Survival proportion at each time point is estimated by product-limit method, and confidence interval in the estimate of proportion is calculated by approximating binomial distribution with a normal distribution. Although it is the most commonly used TTE analysis methods with many advantages, it is limited in that it is not adequate for simulation, and statistical significance of continuous covariate such as time varying covariates per se cannot be tested.
This tutorial reviewed essential concept to understand parametric TTE models focusing on exponential, Weibull, and log-logistic models which as far as I know, are the most commonly used TTE models. Furthermore, accelerated failure time model, a covariate model for TTE model is introduced as well as conventional proportional hazard model.

BASIC FUNCTIONS FOR TTE MODELING
There are essential functions to understand TTE data modeling, which are probability function (f(t)), survival function (S(t)), and hazard function (h(t)) as described below.
Probability density is simply a probability that an event occurs at each time, and it can be described as a mathematical formula if the change of probability density over time is assumed to follow certain pattern. Probability density function can be described by multiplying hazard and survival function as following equation.
Probability density: where t is a particular time, h(t) and S(t) are hazard and survival function as described below, respectively.
Survival function (S(t)) is defined as 1 -cumulative density of an event (F(t)). Cumulative density function is simply an integral of probability density over time and means cumulative probability that an event occurs until time (t). Therefore, 1 − F(t) can be interpreted as the probability that an event has not yet occurred until time (t). (2) ; T is a random variable denoting the time of event, therefore P(T≥t) can be interpreted as cumulative probability that an event occurs at time, t or thereafter.
Hazard is a conditional probability that an event will occur in a small interval ([t, t+∆t)) given that it has not occurred before. Taking ∆t to the limit zero, an instantaneous rate of occurrence at each particular time, t is obtained as described in equation 3. Hazard function can be expressed by f(t) divided by S(t). ( From the relationship among f(t), S(t) and h(t), by specifying one of the three functions the other two functions can be also specified.

TTE MODELS Exponential model
Exponential model describes the survival (S(t)) over time as exponential decay model, similar to the concentration over time after intravenous bolus injection of a drug following monoexponential decay. Only one parameter, λ is required, which determine the degree of decrease in S(t) over time (Eq. 4).

From the relationships among the functions, f(t), and h(t) can be derived as follows.
It is evident from the above equation that hazard is constant in exponential survival model. Using the inverse function of equation 4, time to any survival probability value (t(S)) can be calculated, as well as time to median (50%) survival (t(50)). (8)

Weibull model
Weibull model is defined as equation 9, providing more flexibility in S(t) over time plot than exponential model with an additional parameter (γ). Weibull model is reduced to exponential model when γ=1.
From the S(t), f(t), and h(t) are derived as follows.
Constant hazard model assumed in exponential model rarely tenable in reality. As can be guessed in equation 10, hazard changes over time in Weibull model, but either in monotonical increase or decrease.
Time to any survival probability value (t(S)), and time to median survival (t(50)) are derived as follows. (12)

Log-logistic model
Log-logistic model is defined as equation 14 with two parameters. Log-logistic model is structurally distinctive one from Weibull model, and there is no full -nested model relationship between log-logistic and exponential model.
From the S(t), f(t), and h(t) for log-logistic model are derived as follows.
From equation 15. hazard in log-logistic model also change over time as in the case of Weibull model. However, hazard in log-logistic model can also describe non-monotonical changes such as initial increase in hazard then decrease, and vice versa, whereas hazard change over time in Weibull model is limited to monotonical ones.
Time to a particular survival probability value (t(S)), and time to median survival (t(50)) in log-logistic model are derived as follows. (17) Important functions for exponential, Weibull, and log-logistic models are summarized in Table 1.

COVARIATE MODELS Proportional hazard model
Proportional hazard model assumes that covariates affect the hazard in the form of multiplication. Equation 19 states that the hazard with covariate X i (h i (t|X i )) is equal to baseline hazard (h 0 (t))) multiplied by covariate effect, � * × � , where * are covariates and β i are parameters relating the covariate and hazard. Exponentiation of covariates multiplied by their relating parameters keeps the values positive. From equation 19, the relationship between survival function (S i (t|X i )) with covariate and baseline survival (S 0 (t)) is derived as equation 20.  where * × = 1 * 1 + 2 * 2 + 3 * 3 + ⋯ . χ 1 , χ 2… are covariates, and β 1 , β 2 are parameters relating the respective covariate to hazard.