The analysis of adverse event data is a pivotal aspect in ascertaining the safety of vaccines and drugs. While a multitude of statistical techniques are available, there is an ongoing need to cultivate innovative methodologies for robustly assessing vaccine and drug safety. This article introduces a novel approach that augments the Kaplan-Meier estimator through the incorporation of the Kalman filter algorithm. The method entails initially modeling the data through a generalized state-space model, in which the Kalman filter algorithm is employed to estimate failure probabilities. Subsequently, the Kaplan-Meier estimator is derived using these estimated failure probabilities. To demonstrate the application of this approach, we employ it in the analysis of the opiate dependence treatment study, offering a comparative evaluation against the conventional approach.