covariate vector $\mathbf{x}$ in various ways. This paper considers the Cox-type multiplicative hazard model $$\lambda(t|\mathbf{x})=\lambda_{0}(t)\exp\left(\mathbf{x}^{\prime}\mathbf{\boldsymbol{\beta}}\left(t\right)\right),\label{eq:dynamic model}$$ where $\boldsymbol{\beta}\left(t\right)$ is a vector of time-varying regression coefficients which models the effect of the covariates on the hazard function. The *survival function*,

$$S\left(t|\mathbf{x}\right)=\exp\left(-\int_{0}^{t}\lambda(s|\mathbf{x})ds\right),\label{survival function}$$

is the probability that an individual with profile $\mathbf{x}$ has not experienced the event by time $t$. Given observed data for $n$ individuals: the exposure time $t_{i}$, the censoring indicator $d_{i}$ ($d_{i}=0$ if censored, and $d_{i}=1$ if event occurs), and the covariate vector $\mathbf{x}_{i}$ (for $i=1,\cdots,n$), the likelihood function is expressed as

$$L\left(t_{1},\ldots,t_{n}\vert\mathbf{\boldsymbol{\beta}}\left(t\right)\right)=\prod_{i=1}^{n}\lambda\left(t_{i}|\mathbf{x}_{i}\right)^{d_{i}}S\left(t_{i}|\mathbf{x}_{i}\right).\label{eq:likelihood}$$

This model can be factorized sequentially into temporal factors by assuming that the hazard function is piecewise constant, which results in the PEH model [@gamerman1991dynamic].

The piecewise exponential hazard model\[subsec:PE model\]
---------------------------------------------------------

The PEH model partitions time into consecutive disjoint intervals, $I_{j}=[\tau_{j-1},\tau_{j})$ (where $j=1,\cdots,J$ and $\tau_{0}=0<\tau_{1}<,\cdots,<\tau_{J}$), and assumes that the baseline hazard function is constant within each interval $I_{j}$ ; i.e. $\lambda_{0}(t)=\lambda_{0j}$, for $t\in I_{j}$ and $\lambda_{0j}>0$. Furthermore, it assumes that the vector of regression coeficients $\boldsymbol{\beta}\left(t\right)$ is piecewise constant; i.e $\boldsymbol{\beta}\left(t\right)=\boldsymbol{\beta}_{j}$ if $t\in I_{j}$. Therefore, the hazard function is represented by several constant parameters $\lambda_{1},\ldots,\lambda_{J}$, where each $\lambda_{j}$ is connected to the covariate information of 