Factors influencing the development and amelioration of suicidal thoughts in the general population