Comparison of risk factors for the onset and maintenance of depression