A Semi-Markov Chain Approach to Modeling Respiratory Patterns Prior to Extubation in Preterm Infants