The present invention relates to a method of diagnosing constipation in human subjects that comprises detecting the presence of methane in a breath sample from the subject. The invention also concerns agents that may be used to manipulate the rate of gastrointestinal transit and thereby treat conditions such as constipation and diarrhea.