Pulmonary rehabilitation is effective for patients with COPD , but its benefit is less clearly established in idiopathic pulmonary fibrosis ( IPF ) , especially in regard to levels of physical activity and health-related quality of life .