Analyzing the relationship between corporate social responsibility and foreign direct investment