The following R code implements a piecewise Weibull NHPP model. In the context of repairable systems a Weibull NHPP model is also known as the Crow-AMSAA model.

Technical details of the piecewise NHPP model are given in: Guo, H., Mettas, A., Sarakakis, G., and Niu, P. (2010), *Piecewise NHPP Models with Maximum Likelihood Estimation for Repairable Systems*, Reliability and Maintainability Symposium (RAMS), 2010 Proceedings. Continue reading R code for fitting a piecewise NHPP model