Planning a cohort or case-control study with allowance for cost and test power.