An airflow signal corresponding to the breathing of the patient is obtained. A section corresponding to inspiration, having a front portion and a middle portion, is found within the airflow signal. A peak value of the front portion is found, which is compared with a value representing the airflow of the middle portion. The presence of resisted breathing is determined based on the comparison between the peak value of the front portion with a value representing the airflow of the middle portion. A baseline value of the airflow signal is found by calculating the mode of values within an airflow signal representing the pressure within a patients naris. The section corresponding to inspiration is determined by finding peak inspiration and baseline values within a breath and searching from the peak until the baseline is reached to find the section of inspiration.