# Example 1: Stage I (Low Risk)
# Female (0), 55yo (0), FVC 80% (0), DLCO 60% (0)
# Score = 0
gap_index_ipf("female", 55, 80, 60)
# Example 2: Stage III (High Risk)
# Male (1), 70yo (2), FVC 45% (2), DLCO Unable (3)
# Score = 1 + 2 + 2 + 3 = 8
gap_index_ipf("male", 70, 45, 0, 1)
Run the code above in your browser using DataLab