Anxiety and depression are common in patients with idiopathic pulmonary fibrosis and are significantly affected by the diagnostic criteria used.