Statistical analysis
We calculated that a sample of 80 subjects per group would provide the trial with 80% power to detect non-inferiority of the primary outcome at an alpha of 0.05 and a non-inferiority margin of 15 percentage points, assuming a dropout rate of 10%, and that ∼80% of the subjects in the TIE index group and the T-piece trial group would have successful weaning (The Kolmogorov-Smirnov test was used to assess the distribution pattern of the variables. Results are reported as mean and standard deviation for normal distribution or median and interquartile range otherwise. Differences between continuous variables were compared with the two-tailed 