Introduction

The main purpose of our study is to investigate the effects of urbanization on residents’ health risks in China. As stated in Agenda 21 of the Sustainable Development of the United Nations, there can be no healthy development without a healthy population. The 19th National Congress of the Communist Party of China pointed out that “A healthy population is a key indicator of a prosperous nation and a strong country,” and clearly put forward the development strategy of building a healthy China. Promoting the development of a healthy China is an important foundation for creating a moderately prosperous society in all respects and achieving socialist modernization. The health of residents is the basis for creating a healthy China. As an important embodiment of the national quality of life and social stability, health is significant to the survival and development of human beings. On the one hand, China’s economic development has entered a new normal; the industrial structure is in a critical stage of transformation and upgrading. Since China has reached the “Lewis turning point,” the traditional economic development momentum is insufficient, and future economic growth will primarily be driven by reform and innovation. Therefore, improving the level of human capital to ensure economic growth has become an important development direction of the Chinese economy. Health is a critical component of human capital (Albertini et al. 2021), and has important practical significance for social and economic development. On the other hand, China has completed the development of a moderately prosperous society in all respects by 2021, and the living standards and quality of life have generally improved. According to Maslow’s hierarchy of needs theory, residents are more likely to place higher importance on health as an economy develops. Against this background, it is critical for the formulation of public policies and sustainable economic development to investigate channels and mechanisms to improve residents’ health and reduce their health risks.

As the product of modern civilization, cities have a substantial influence on the health of residents during economic and social development. Over the past two decades, China has experienced rapid urbanization. The urbanization rate rose from 36.22% in 2000 to 64.72% in 2021 and is expected to reach 65.5% in 2025. Thus, urbanization has played a key role in absorbing surplus rural labor, promoting industrial aggregation and accelerating regional economic development. It is a crucial aspect of China’s economic and social development level. In 2020, China proposed a new development pattern focusing on domestic circulation and domestic demand to achieve internal circulation. President Xi Jinping of China has repeatedly emphasized that urbanization is critical for maintaining the development momentum of China’s domestic demand. The importance of urbanization increases continuously. However, the rapid advancement of urbanization has brought new challenges to residents’ health. Decades of rapid urbanization in China have provided opportunities to improve people’s health because residents living in urban areas typically have better access to medical services and education and have higher income levels than those living in rural areas. However, urbanization has also resulted in many new health risk factors, especially the unique challenging environmental and social conditions of cities. For example, urbanization in China has caused bad eating habits, a more sedentary lifestyle, and more pollution, adversely affecting the future health of the population.

Most related studies focused on the positive or negative effects of urbanization on health, while ignoring the long-term trends on residents’ health risks. The impact of urbanization on health is the result of multiple factors, and the relationship between the two may be complex and nonlinear. The future development dynamics of urbanization in China will remain strong, and the country’s health policy has continued to advance. The actions of the Chinese government during the recent COVID-19 pandemic are a reflection of the importance the country attaches to people’s health. Against this background, it is of practical significance to study the impact of urbanization on residents’ health to promote science-based and rational urbanization to reduce residents’ health risks and promote the development of a healthy China.

Literature review

Scholars have conducted extensive research on residents’ health risks, focusing primarily on the following aspects. The first is the current situation and characteristics of residents’ health. The spatial distribution of people’s health status in China is typically a “T-shaped” pattern characterized by declining health from east to west and from the center to the north and to the south (Zhao et al. 2018). The second aspect is the analysis of the influencing factors of residents’ health, including the following four factors. (1) Economic factors. Most studies have found that an improvement in the economic level reduced residents’ health risks (Lu et al. 2017; Zhao et al. 2018), although some studies reported that a high income was positively associated with a higher risk of chronic diseases (Miao and Wu 2016). (2) Education level. Most studies have affirmed the inhibitory effect of the education level on residents’ health risks (Tan et al. 2020). (3) Investment in medical resources. Most studies have acknowledged the positive effect of medical resources on residents’ health (Lu et al. 2017; Baguma 2017). (4) Environmental pollution. The consensus is that environmental pollution has a significant negative effect on residents’ health (Lu et al. 2017). The third aspect is the analysis of the impact of health on economy and society. The aspect is closely related to health economics. It is a critical component of human capital and affects economic development (Albertini et al. 2021).

Table 1 summarizes the relevant literature on the effects of urbanization on people’s health. This topic is controversial, and different scholars have reached inconsistent conclusions. Some scholars believe that urbanization can improve the health level of residents (Brueckner 2019; Chen et al. 2014; Liu et al. 2017). Another view is that urbanization has a negative impact on residents’ health (Eckert and Kohler 2014; Zheng and Kahn 2013), is harmful to the health of some vulnerable groups (Qin et al. 2013), increases the risk of malnutrition among residents (Poel et al. 2012), and also increases the probability of reporting poor health (Van de Poel et al. 2012). However, some scholars pointed out that the impact of urbanization on health is complex, and found an inverted U-shaped relationship between urban development level and residents’ health risks (Chen et al. 2017b). When the per capita GDP exceeds a threshold, the negative impact of urbanization on residents’ health increases significantly (Jiang et al. 2021). Other scholars have studied the effects of urbanization on the health risks of different groups. Urban residents typically have better health than rural residents (Chen et al. 2017a). Urbanization has a more pronounced effect on women (Colvin 2015) and is more likely to pose risks to the mental health of black and white children (Ventriglio et al. 2020).

Table 1 Effects of urbanization on residents’ health risks

Different scholars hold different views on how urbanization affects residents’ health. Some believe that urbanization improves the health status of residents by increasing their education level and income level (Jiang et al. 2021) and improving health services (Liu et al. 2019). In contrast, some studies have shown that the expansion of cities causes environmental pollution problems, increases the concentration of PM2.5, causes air pollution, and threatens the health of residents (Lu et al. 2021; Liu et al. 2022; Dong et al. 2021). Besides, urbanization has changed the personal life and work style and increased the health burden of residents (Gong et al. 2012; Li et al. 2016) and health care expenditure (Shao et al. 2022), thereby increasing the health risks of residents.

In summary, scholars have examined the relationship between urbanization and residents’ health risks from multiple perspectives, providing a solid foundation for our study. However, these studies have some shortcomings.

First, most studies have focused on the correlation between urbanization and health risks and the path of influence (Chen et al. 2017b; Van de Poel et al. 2012) and conducted normative, empirical analyses of the linear causal relationship. However, few researchers studied the nonlinear effects of urbanization on residents’ health risks. Our study portrays the effect of urbanization on residents’ health risks more accurately and realistically. In addition, we analyze the moderating role of income and environmental factors on the effect of urbanization on residents’ health risks, providing deeper insights into this relationship.

Second, studies have focused on the analysis of heterogeneity at the micro level, examining differences in the impact of urbanization on the health of different groups. Groups were divided by income level (Miao and Wu 2016), gender (Colvin 2015), and age (Chen et al. 2017b), and some studies examined differences in the impact of urbanization on urban and rural areas (Eckert and Kohler 2014). In contrast, we perform macro-level heterogeneity analysis and explore the differences in the impact of urbanization on residents’ health risks under regional infrastructure imbalances. Thus, we provide information critical for decision-making and public policy formulation.

Third, some health indicators in previous studies may not have been suitable. Scholars who adopted macro data analysis used perinatal mortality (Lu et al. 2017), maternal health coverage (Hanlon et al. 2012), or life expectancy (Eckert and Kohler 2014) as health indicators, but these indicators do not adequately reflect the health of residents. Even if the population mortality decreases, many chronic diseases increase residents’ health risks. There is also a tendency to use microdata analysis to measure health using self-rated health outcomes (Albertini et al. 2021; Tan et al. 2020; Poel et al. 2012), but microdata may be may be subjective and applicable only to certain and applicable only to certain groups. In this study, we use the average number of residents’ visits as an indicator of residents’ daily health. In reality, the health concerns of residents are not only about the final outcomes, such as life expectancy, but people are more concerned and interested in their daily health status.

Theoretical mechanism of the effect of urbanization on residents’ health risks

Urbanization can have a positive impact on residents’ health. First, urbanization improves the infrastructure and has the following effects: (1) medical resources are more abundant, i.e., the number of health facilities assess to medical insurance coverage, and improvements in medical technology. (2) The health facilities have high quality, improving the ability to provide a high health service level and prevent epidemics. (3) The transportation facilities are abundant, making people’s daily lives more convenient. An improvement in infrastructure enable more convenient access to medical treatment, improves the medical technology level, and reduces population mortality. Second, educational resources are more abundant in cities than in rural areas. Thus, urban residents can acquire more knowledge about health and disease prevention, raising the awareness level of urban residents regarding their health. Third, urbanization o is typically associated with higher economic development and income levels. A higher income level enables people to invest in health through social insurance, exercise, and fitness to reduce stress and improve mental health, thus reducing residents’ health risks.

Urbanization can also have adverse impacts on residents’ health. First, urbanization is associated with high industrialization. The discharge of industrial wastewater, smoke, and dust causes environmental problems, such as air and water pollution, damages the ecological environment, and increases the probability of residents suffering from cardiovascular and respiratory diseases. Second, urbanization has changed the work and lifestyle of residents. Urban residents are mostly engaged in sedentary work, do not exercise enough, and often eat high-calorie and high-fat foods, leading to obesity and hypertension. The fast-paced work and lifestyle in cities increases residents’ mental stress, potentially causing mental illness. Third, the crowded population in cities increases the spreading probability of infectious diseases and the cost of medical services.

Figure 1 shows the mechanism of the effect of urbanization on residents’ health. The impact of urbanization on residents’ health is the result of many factors. The role of each factor may differ in different urbanization stages; therefore, the relationship between urbanization and residents’ health is complex and nonlinear.

Fig. 1
figure 1

The mechanism of the effect of urbanization on residents’ health

Although few studies have examined the transmission mechanism of the effect of urbanization on residents’ health risks, it has been shown that income and environmental factors are critical. Jiang et al. (2021) found that the impact of urbanization on health differed for different income groups, with greater health risks in high-income groups (Miao and Wu 2016). In addition, a change in income causes the impact of urbanization on health to shift from a linear to a nonlinear relationship (Chen et al. 2017b). Lu et al. (2021) acknowledged that the emission of pollutants as a result of urbanization increased the health burden of residents. An increase in emissions is a major factor contributing to increases in health risks during urbanization (Dong et al. 2021; Ding and Li 2017). Therefore, we investigate the moderating effects of income and environmental factors in the relationship between urbanization and health risks to clarify the underlying mechanism.

Data and methods

Data resources and descriptive statistics

This study used annual data of the relevant variables from 31 provinces (autonomous regions and municipalities directly under the central government) in China from 2004 to 2019 (due to the lack of relevant data from Hong Kong, Macao, and Taiwan, these regions were excluded) to construct a balanced panel. All data were obtained from China Statistical Yearbook and China Environmental Statistical Yearbook. The variables are as follows:

  • Explained variable: residents’ health risks (HE). Residents’ health risk is a multi-dimensional concept, and it is difficult to select one index to measure it. Thus, we used the average number of residents’ visits (VI) and population mortality (DE). The former reflects the daily health level of residents, and the latter describes the terminal health level of residents.

  • Core explanatory variable: urbanization rate (UR). Consistent with a lot of literature, this study uses the ratio of urban resident population to total population to measure the urbanization level of each region.

  • Control variables. According to the analysis of the theoretical mechanism, we chose the following variables: income level (GDP) is expressed as the per capita gross domestic product; education level (ED) is expressed by the population aged 6 and above with high school education; medical health level (ME) is expressed by the average number of medical and health personnel per 10,000 persons. The degree of environmental pollution (EN) is measured by the annual emission of sulfur dioxide. Environmental pollution inhibits urbanization in China (Wu et al. 2020), affecting residents’ health. If residents are exposed to polluted air for a long period, they are more affected by air pollution. China’s energy consumption structure is dominated by coal combustion, and pollutants such as sulfur dioxide and smoke dust are the main causes of air pollution. Thus, we chose the annual emission of sulfur dioxide to reflect the degree of environmental pollution. The level of population aging (OR) is measured by the dependency ratio of the elderly population. Table 2 lists the descriptive statistics of the variables.

Table 2 Descriptive statistics of the main variables

Figure 2 shows the relationship between the urbanization rate in China and residents’ health risks. As the urbanization rate increases, the population mortality increases and decreases, and the average number of residents’ visits increases. The data were averaged at the provincial level, but the economic development and urbanization levels vary greatly in different Chinese provinces. Thus, further analysis is required.

Fig. 2
figure 2

The relationship between urbanization and residents’ health in China

Figures 3 and 4 show the box scatter diagram of the average number of residents’ visits and population mortality, respectively, over time. Figure 3 shows that the average number of residents’ visits can be divided into three stages. The average number of residents’ visits shows an upward trend from 2004 to 2014, declines slightly from 2014 to 2017, and increases after 2017. Most provinces exhibit a low number of residents’ visits. The distance between the upper edge and the upper quartile is the largest in the boxplot, indicating that the residents’ health risks are substantially different in high-value areas. The distance between the lower edge and the lower quartile is the smallest, suggesting that residents’ health risks are similar in low-value areas. Although the number of provinces with high-value areas is small, there are large fluctuations, indicating the sensitivity of health risks to policies in high-value areas. The number of provinces in low-value areas is relatively large, the changes are small, and the response to relevant policies is relatively slow.

Fig. 3
figure 3

Box scatter diagram of the average number of residents’ visits

Fig. 4
figure 4

Box scatter diagram plot of population mortality

Figure 4 shows no significant change in population mortality over time. Most provinces have high mortality, but the data are scattered. The distance between the lower edge and the lower quartile is large, indicating that residents’ health risks differ in the low-value areas. In contrast, the distance between the upper edge and the upper quartile is relatively small, suggesting that residents’ health risks are similar in these provinces.

Methodology

Ehrlich et al. established the IPAT model, namely I = P A T, to analyze the impact of human economic activities on the environment. This model has been widely used because of its simplicity and intuitive interpretation; however, it has limitations, i.e., it is assumed that the influence of the independent variables on the dependent variables is proportional. Dietz and Rosa (1997) revised the IPAT model and proposed the STIRPAT model:

$${I}_{it}=\alpha {P}_{it}^{{\beta }_{1}}{A}_{it}^{{\beta }_{2}}{T}_{it}^{{\beta }_{3}}{e}_{it}$$
(1)

where I and t, respectively, represent the individual and the observation time, I represents the environmental factor, P represents the population factor, A represents the degree of wealth, and T represents the technical level; α is a constant term; β1, β2, and β3 are parameters to be estimated, and e is a random error term. This equation has been widely used to analyze the influence of various factors on the environment. A natural logarithm transformation of the variables eliminates sequence correlation and changes a nonlinear relationship into a linear relationship, reducing the influence of heteroscedasticity and data fluctuation on the model estimation results. This study uses the urbanization rate as the core explanatory variable and residents’ health risks as the explained variable and establishes models that include the first-order, quadratic term, and cubic term of the urbanization rate; I and t represent the provinces and years, respectively, and Ɛ is a random error term:

$$\mathrm{ln}H{E}_{it}={\alpha }_{1}+{\alpha }_{2}\mathrm{ln}U{R}_{it}+{\alpha }_{3}\mathrm{ln}GD{P}_{it}+{\alpha }_{4}\mathrm{ln}E{D}_{it}+{\alpha }_{5}\mathrm{ln}M{E}_{it}+{\alpha }_{6}\mathrm{ln}E{N}_{it}+{\alpha }_{7}\mathrm{ln}O{R}_{it}+{\varepsilon }_{it}$$
(2)
$$\mathrm{ln}H{E}_{it}={\alpha }_{1}+{\alpha }_{2}\mathrm{ln}U{R}_{it}+{\alpha }_{3}\mathrm{ln}U{R}_{it}^{2}+{\alpha }_{4}\mathrm{ln}GD{P}_{it}+{\alpha }_{5}\mathrm{ln}E{D}_{it}+{\alpha }_{6}\mathrm{ln}M{E}_{it}+{\alpha }_{7}\mathrm{ln}E{N}_{it}+{\alpha }_{8}\mathrm{ln}O{R}_{it}+{\varepsilon }_{it}$$
(3)
$$\begin{array}{c}lnH{E}_{it}={\alpha }_{1}+{\alpha }_{2}lnU{R}_{it}+{\alpha }_{3}lnU{R}_{it}^{2}\text{+}{\alpha }_{4}lnU{R}_{it}^{3}+{\alpha }_{5}lnGD{P}_{it}+{\alpha }_{6}lnE{D}_{it}+{\alpha }_{7}lnM{E}_{it}+{\alpha }_{8}lnE{N}_{it}\\ +{\alpha }_{9}lnO{R}_{it}+{\varepsilon }_{it}\end{array}$$
(4)

Model (5) is constructed to evaluate the moderating effect of income and environmental factors on health risks, where X is the moderating variable. The core and moderating variables have been decentered to avoid the problem of multicollinearity.

$$\begin{array}{c}lnH{E}_{it}={\beta }_{1}+{\beta }_{2}lnU{R}_{it}+{\beta }_{3}lnGD{P}_{it}+{\beta }_{4}lnE{D}_{it}+{\beta }_{5}lnM{E}_{it}+{\beta }_{6}lnE{N}_{it}+{\beta }_{7}lnO{R}_{it}\text{+}\\ {\beta }_{8}lnU{R}_{it}*ln{X}_{it}+{\varepsilon }_{it}\end{array}$$
(5)

Results and discussions

Stationarity test and co-integration test

An important prerequisite for regression analysis of panel data is data stability or data has the same single integer order. It is necessary to perform unit root tests on each variable to avoid spurious regression in empirical analysis. In this study, the Levin-Lin-Chu (LLC) test and augmented Dickey-Fuller (ADF) test were used to test the unit root of the panel data. The test results are listed in Table S1. All variables passed LLC test and ADF test in the first-order difference and were first-order single integer I(1) sequences.

The Kao test and Pedroni test were used co-integration tests to determine if a stable long-term relationship existed between residents’ health risks and the explanatory variables. The test results are listed in Table S2. The results of most panel data co-integration tests indicated a co-integration relationship between the explanatory and explained variables; thus, there was a stable long-term relationship between residents’ health risks and the explanatory variables.

Estimation results of panel model at the national level

Table 3 reports the estimated results of the effects of urbanization on the average number of residents’ visits and population mortality in 31 provinces (autonomous regions and municipalities directly under the central government) in China during 2004–2019. The Hausman test results show that a fixed-effects model can be used (P = 0), regardless of the health risks measured by the average number of residents’ visits or population mortality.

Table 3 The impact of urbanization on residents’ health risks

The coefficient of lnUR in model (1) is significant and positive, and the coefficient of lnUR in model (4) is significant and negative, indicating that urbanization significantly increases the average number of residents’ visits and significantly reduces population mortality (Jiang et al. 2021). Urbanization changes residents’ living environment, lifestyle, and income level. The deterioration of the living environment, increasing stress and changes in work habits have adversely affected people’s bodies and minds (Lu et al. 2021), increasing their health risks. However, due to an increase in income and the popularization of health and medical insurance, people have focused more on their physical and mental health (Chen et al. 2014). People who are afflicted by diseases or have mental health conditions will see doctors, increasing the average number of visits. Urbanization has also resulted in an increase in the number of medical facilities and resources, as well as advances in medical technology (Gong et al. 2012). Combined with the fact that residents are more likely to seek medical care and restore their health in time, urbanization has led to a decrease in mortality.

Models (2), (3), and (5) include the quadratic and cubic terms of the urbanization rate, respectively, to evaluate whether the effect of urbanization on residents’ health risks is nonlinear.

The estimation results obtained from model (3) show that the effect of the urbanization rate on the average number of residents’ visits is nonlinear, and there is a significant N-shaped relationship between the two. There are two inflection points in this curve. The first one occurs when the average number of visits changes from an increasing trend to a decreasing trend as urbanization progresses. At this point, China’s urbanization rate is low, and the negative impact of urbanization on the environment is relatively small. Before the first inflection point, an increase in the residents’ income and improvements in medical services were the main reasons for an increase in the number of visits. At a low level of urbanization, the lack of medical infrastructure and the low level of medical technology in most areas of China made it difficult for residents to access medical care; thus, many residents did not have positive views of medical care. After the inflection point, a downward trend is observed in the average number of visits. The main reasons are the decline in residents’ health risks and their neglect of health. Environmental pollution a relatively small impact on residents’ health at this stage, and improvements in infrastructure and medical technology were beneficial to residents’ health. The economic effect of urban development was beneficial to residents, solving the employment problem and improving the economic conditions and the lives of residents (Tan et al.2020), thus reducing health risks. However, residents tended to focus less on their health, and the average number of visits decreased.

The second inflection point occurs when the average number of residents’ visits changes from a decreasing trend to an increasing trend as urbanization progresses. The main reasons are the deterioration of the living environment and the importance residents attach to their health. At this stage, the level of urbanization is high. People have focused on economic benefits and ignored environmental problems, resulting in environmental degradation. Environmental pollution has increased significantly, with pollutants such as industrial fumes, dust, and sulfur dioxide, adversely affecting the daily health of residents (Dong et al. 2021) and increasing their health risks. In addition, a high-income level does not guarantee happiness. At this stage, the material needs of Chinese residents are met, and more residents pursue a spiritual life. Higher education levels cause residents to focus on physical and mental health, participate in daily medical checkups, and actively seek medical treatment. As a result, the average number of residents’ visits continued to increase.

The estimation results from model (5) show that the effect of the urbanization rate on population mortality is also nonlinear, with a significant U-shaped relationship between the two. This curve has an inflection point, i.e., the population mortality shifts from a downward trend to an upward trend with the development of urbanization, and the health risks increase. Before the inflection point, advances in medical technology and rising income levels were the main reasons for a decline in population mortality. Residents had the money for medical treatments, hospitals had the ability to treat diseases, the average life expectancy of residents rose, and the population mortality declined. However, as the urbanization rate increased, so did the pollution level. This stage was characterized by rapid urban development, and the national policy of pursuing economic development led to a substantial disregard for environmental issues. Moreover, the rising prices of goods and materials and the cultural needs of residents increased the stress of urban residents. Environmental problems and life pressures increase the probability of serious illnesses and significantly increase health risks of residents (Miao and Wu 2016). Medical technology has a larger influence on population mortality than medical resources; however, China’s medical technology at this time required improvements, and the cure rate of serious diseases was low, increasing population mortality (Li et al. 2016; Poel et al. 2012).

Theoretically, another inflection point occurs as the urbanization rate increases, resulting in a downward trend of population mortality. The main reason is that the negative impact of urbanization on the environment is mitigated by technological innovation and structural transformation, improving the living environment of residents (Chen et al.2017a). Meanwhile, the further improvement of urban medical technology provides better public health services for urban residents, reducing their health risks as the urbanization rate increases. However, the national data of China indicate that the third order term in the model is not significant, suggesting that the urbanization level of most provinces has not yet reached this stage. Therefore, we observe a U-shaped relationship between population mortality and urbanization rate, which is confirmed by the results of the regional analysis in Table 9.

This nonlinear effect of urbanization on residents’ health risks reflects the economic and environmental influences of urban development. In the early stages of urbanization, the economic development and industrialization levels are low, thus, the impact on the environment is low. Society is focused on economic development and advances in industry and technology. As a result, medical technology improves, and people’s income level increases, reducing health risks. As the urbanization rate increases, the economic development level rises significantly, and people enjoy the benefits of economic development. However, industrialization causes emissions, wastewater discharge, and environmental pollution, thereby increasing residents’ health risks. The economic development level is low at this stage and people still benefit from urbanization. Thus, policies are focused on economic development and less on environmental problems, and people pay less attention to health problems. When the level of urbanization is high, the income level of residents is high, and people tend to focus on more than material life. The pursuit of economic development while ignoring environmental degradation in the past has adversely affected the ecological environment and significantly increased residents’ health risks. The future development of urbanization must balance economic development and environmental protection to achieve economic and social progress.

Other variables have different effects on residents’ health. The income level is positively correlated with the average number of residents’ visits and population mortality. Areas with higher income levels often have substantial environmental degradation and higher living pressures (Jiang et al. 2021), and the residents have higher risks of illness. The medical health level has a positive correlation with the average number of residents’ visits and population mortality; thus, improving medical technology is critical to reduce health risks (Baguma 2017; Liu et al. 2019). The effect of the education level on the average number of residents’ visits is not significant but is significantly and negatively correlated with population mortality. An improvement in the education level can help residents to acquire more knowledge about health and disease prevention, increase the residents’ focus on health (Tan et al. 2020), and reduce population mortality. The level of population aging is positively correlated with the average number of residents’ visits and population mortality. As China’s population is aging, more attention should be directed at the health problems of the elderly (Chen et al. 2017b; Gong et al. 2012). We should actively promote old-age welfare, improve the health level of all people, and reduce the possible negative impacts of an aging population on the development of a healthy China.

The fitted curves describing the relationships between the UR and the VI and DE are shown in Fig. 5. The results show the following: lnUR has an N-shaped relationship with lnVI, with inflection points at 3.423 and 3.745, respectively. When the urbanization rate is below 30.66%, the average number of residents’ visits increases with an increase in the urbanization rate. At urbanization rates between 30.66 and 42.31%, the average number of residents’ visit decreases with an increase in the urbanization rate. When the urbanization rate exceeds 42.31%, an increase in the urbanization rate results in an increase in the average number of residents’ visits. There is a U-shaped relationship between lnUR and lnDE, with an inflection point at 3.841. When the urbanization rate exceeds 46.57%, an increase in the urbanization rate increases population mortality.

Fig. 5
figure 5

Fitting curves describing the relationship between the urbanization rate and residents’ health risks

Results of moderating effect test

Table 4 lists the results of the moderating effect test. Model (1) shows that the coefficient of lnUR* lnGDP is significant and positive, and the coefficient of the urbanization rate is positive, indicating that an increase in the income level reinforces the positive effect of urbanization in increasing the average number of residents’ visits. The income level reflects the living standard. As it increases, residents are more likely to seek medical care when they experience health problems (Ettner 1996; Gong et al. 2012). The positive coefficient of lnUR*lnEN in model (2) indicates that environmental pollution reinforces the positive effect of urbanization in increasing the average number of residents’ visits. Increased emissions due to urbanization can threaten the health of residents in the long run (Lu et al. 2021), increasing their health risks. The coefficient of lnUR*lnEN in model (3) is positive, whereas the coefficient of the urbanization rate is negative, indicating that environmental pollution weakens the negative effect of urbanization in reducing population mortality. Some pollutants cause specific diseases and long-term damage (Salim et al. 2014), increasing population mortality at the macro level (Li et al. 2016).

Table 4 Results of the test of the moderating effects of income and environment

Results of endogeneity and robustness tests

Discussion on endogeneity

Although few studies have investigated the effect of residents’ health risks on urbanization, residents’ health risks may affect urbanization. On the one hand, health is an important human capital (Albertini et al. 2021) driving economic development (Tsai et al. 2010). On the other hand, a population increase typically results in environmental degradation (Ahmed et al. 2020; Danish et al. 2019), and environmental pollution negatively influences urbanization (Wu et al. 2020). Thus, there may be a two-way causal relationship between urbanization and residents’ health risks.

Accurate estimations of fixed effects rely on the exogeneity assumption of the explanatory variables. A two-way causal relationship between residents’ health risks and urbanization may lead to endogeneity. In addition, the omission of variables also leads to endogeneity because it is difficult to include all variables that may affect health risks.

We chose the water consumption of each province as an instrumental variable (IV) for urbanization to reduce endogeneity. The water resources are a critical factor influencing economic growth and population rise (Wu and Tan 2012), the water consumption of each province satisfy the exogeneity and relevance of the instrumental variable. We used the per capita water consumption (unit: liter) to describe water consumption. Table 5 reports the results of the endogeneity test in the two stages. The coefficient of the IV in the first stage shows a significant correlation between urbanization and per capita water consumption. Moreover, the F-statistic in the first stage is 79.10 and there is no weak instrumental variable problem. The results for the second stage show that the sign and significance of the core explanatory variables are consistent with the results of the benchmark fixed-effects analysis. The results that urbanization reduces population mortality and increases the average number of residents’ visit still hold.

Table 5 Results of endogeneity test

Robustness test

Substitution variable method

Urbanization is a comprehensive process of population urbanization and economic urbanization. The ratio of the output value of secondary and tertiary industries to the GDP (ID, unit: %) and the number of urban employees (EM, unit: 104 person) represent the level of economic urbanization. The ratio of the output value of the secondary and tertiary industries to the GDP reflects industrial development, representing economic urbanization. Urbanization typically results in more employment opportunities as more job seekers flock to cities and towns for employment. The number of urban employees represents the urbanization level.

Table 6 reports the robustness test results after replacing the urbanization rate. The coefficients of the core variables of models (3) and (5) are significant, confirming the robustness of the results. Urbanization still has an N-shaped relationship with the average number of residents’ visits and a U-shaped relationship with population mortality. The results obtained by replacing the urbanization rate remain significant. The ratio of the output value of secondary and tertiary industries to the GDP and the number of urban employees both reflect the economic effect of urbanization. Economic development is beneficial to residents’ health when the negative impact on the environment is low. However, pursuing high economic development causes environmental problems, increasing residents’ health risks.

Table 6 Results of robustness test: substitution variable method

Excluding Beijing and Shanghai

China’s health-care system and medical resources are unbalanced, and medical services in rural areas lag behind those in metropolises such as Beijing and Shanghai (Liu et al. 2016). These cities have the largest number of first-class tertiary hospitals, practicing physicians and care beds. Their competitive medical technology and patient care have attracted a large number of patients from all over the country (Dong et al. 2021).

The average number of residents’ visits and population mortality in Beijing and Shanghai may not accurately represent the health level of local residents. We excluded the data from Shanghai and Beijing and repeated the above steps to test the robustness of the results. Table 7 indicates that the sign and significance of the core variables have not changed significantly, demonstrating the reliability and robustness of the empirical estimation results.

Table 7 Results of robustness test: excluding Beijing and Shanghai

Supplementary variable method

The factors affecting residents’ health risks are diverse, and some factors not considered in this study may affect residents’ health risks. Not including important variables may result in endogeneity and affect the accuracy of the estimation results. Thus, we refer to Jiang et al. (2021) and add the following two control variables to the regression models. (1) Urban population density (lnPOP, unit: person/km2) is defined as the ratio of the urban population and transient urban population to the urban area. High population density increases the transmission of infectious diseases and may lead to increased competition for jobs, increasing the psychological stress of residents. In addition, population gatherings affect the air and environment, which can be harmful to physical and mental health (Hanlon et al. 2012). (2) Government spending share (lnGOV, unit: billion) is defined as the amount spent by the government as a share of the GDP. China implemented a reform of the medical health care system in 1994 to improve the effectiveness of the government’s investment in health and welfare measures, improve people’s health, and accelerate economic development (Jiang et al. 2021). The higher the proportion of the national health expenditure, the more effective the state governance is in improving residents’ health (Ademe et al.2019). Table 8 indicates that the signs of the core variables are the same as before after adding the two control variables, demonstrating the reliability and robustness of the empirical estimation results.

Table 8 Results of robustness test: supplementary variable method

Results of heterogeneity test

Health impact of urbanization in different regions

China covers a large area, and the development level, urbanization level, and medical infrastructure differ in different regions is obviously unbalanced. It is also unreasonable to require different regions to adopt the same policies for development and environmental protection. China was divided into three regions (the eastern, central, and western regionsFootnote 1) to analyze the differences in the effects of urbanization on residents’ health risks in different regions.

The STIRPAT model (4) was used to evaluate the effect of urbanization on residents’ health risks measured by the average number of residents’ visits in the eastern, central, and western regions. The STIRPAT model (3) was used to assess the effect on population mortality in the central and western regions, and the STIRPAT model (3) and model (4) were used in the eastern region. Table 9 reports the regional differences in the impact of urbanization on residents’ health risks. The results obtained from models (1)–(3) are as follows: (1) The coefficients of the core variables in the eastern, central, and western regions are significant, showing that the effects of urbanization on the average number of residents’ visit in different regions are nonlinear. Chow’s test results are significant, indicating that the impact is stronger in the eastern region than in the central and western regions. The possible reasons are the following. The eastern region has a better economic foundation and marketization degree, more medical resources, and better public health services than the central and western regions. Residents have higher human capital and place more emphasis on their physical and mental health. Moreover, the living and working pressure are relatively high in cities in the eastern region; thus, the impact of urbanization on residents’ health risks is stronger in the eastern region. In contrast, urban medical resources are relatively scarce in the central and western regions, and the public infrastructure requires improvement. The educational and medical resources lag behind the number of people moving to the cities, resulting in a smaller effect of the UR on the VI in these two regions than in the east.

The results obtained from models (4)–(7) are as follows: the impact of urbanization on population mortality differs in different areas due to uneven economic development. The eastern region has a more developed economy and a better urbanization foundation than the other two regions. The public health expenditure is higher, and there are more medical resources than in the central and western regions (Zhao et al. 2018). The quadratic and cubic terms of the urbanization rate in the eastern region are significant, and an inverted N-shaped relationship occurs between urbanization and population mortality. The inflection points indicate population mortality decreased as the urbanization rate increased. The industrial structure in the eastern region has improved over time, and the proportion of the tertiary industry in the three industries has increased. The effect of the negative environmental externality resulting from economic growth has decreased due to environmental protection. Urbanization had a positive impact on residents’ health by increasing residents’ income and medical technology and service level and improving public facilities (Lu et al. 2017), reducing population mortality.

Table 9 Health impact of urbanization in different regions

Urbanization has no significant impact on population mortality in the central and western regions. The possible reasons are fewer urban medical resources in central and western China, the lack of public infrastructure, and the fact that educational and medical resources lag behind the number of people moving to cities. Therefore, urbanization has an insignificant impact on population mortality. The urbanization rate has to reach a certain level to affect the living environment of residents, the infrastructure, and residents’ health risks.

Health impact of urbanization for different infrastructure levels

Infrastructure development often lags behind urbanization; therefore, the effect of urbanization on residents’ health risks is affected by the infrastructure level (Ventriglio et al. 2020). If infrastructure development lags behind urbanization rate, the impact of urbanization on residents’ health may not be pronounced. The sample was divided equally into three groups according to the proportion of medical personnel in the total population, STIRPAT model (4) was used to assess the effect of urbanization on the average number of residents’ visits, and STIRPAT model (3) was used to assess the effect on population mortality.

Table 10 shows the following. The impact of urbanization on the average number of residents’ visits is only significant when the infrastructure level is medium to high. There is an N-shaped relationship between the two. The impact of urbanization on population mortality is only significant when the infrastructure level is high, with a U-shaped relationship between the two. Therefore, urbanization only has a significant impact on residents’ health when the infrastructure development keeps up with urbanization. As the urbanization rate increases and there are insufficient medical facilities and medical technology, people cannot be treated adequately even if they have high-income levels and are focused on their health.

Table 10 Health impact of urbanization for different infrastructure levels

Conclusions and recommendations

We used panel data from 31 provinces (autonomous regions and municipalities directly under the central government) in China from 2004–2019 to investigate the effect of urbanization on residents’ health risks (assessed by the average number of residents’ visits to medical facilities and population mortality) utilizing theoretical analysis and empirical tests. This study confirmed that urbanization increased the average number of residents’ visits, and the positive effect was reinforced by an increase in income level and environmental pollution. Urbanization reduced population mortality, but environmental pollution weakened this negative effect. An N-shaped relationship existed between urbanization and the number of residents’ visits, and a U-shaped relationship occurred between urbanization and population mortality. A nonlinear effect of urbanization on health risks was observed only in areas with higher economic development and infrastructure levels.

These findings contribute to the literature by providing new insights into the effects of urbanization on residents’ health risks. This study reveals the nonlinear effects of urbanization on residents’ health risks and the regional differences from a macroscopic perspective and the moderating effects of income and environmental factors in this relationship. According to our results, we provide the following policy recommendations:

First, the government should implement measures to encourage “people-oriented” urbanization to ensure the positive effect of urbanization on residents’ health. Policies should focus on balancing employment in urban and rural areas and agricultural modernization. The lag of infrastructure development reduces the positive spillover effect of urbanization. Thus, it is necessary to improve medical health services and education infrastructure, and reduce residents’ health risks.

Second, the government should promote green urbanization and focus on the quality of urban development. The goal should be a resource-saving and environmentally friendly society. The concept of green ecology should be incorporated into urban development and construction. The discharge of harmful substances should be reduced by increasing penalties. The fiscal and taxation systems should be improved to encourage pollution control, focusing on green urbanization with the participation of the government, enterprises, and residents to reduce the negative effects of urbanization on the environment and improve the living environment of residents.

Third, decision-makers should pay attention to regional differences in urbanization, strengthen investments in medical care, health services, and education in economically underdeveloped areas, and promote balanced regional development. Economically underdeveloped areas often have many industrial enterprises that serve developed areas, and the proportion of the secondary industry is high. The negative effects of urban development on the environment are stronger, and residents’ health risks are higher in underdeveloped regions. These areas should attach greater importance to industrial optimization and upgrading to reduce negative environmental externalities and improve their infrastructure to increase the efficiency of urbanization and improve the health level of residents.

Fourth, national fitness programs should be implemented. Health is critical for social and economic development. It is necessary to develop appropriate designs for cities and towns, increase financial investment in national fitness programs, construct sports facilities, and increase the utilization rate of community fitness equipment to improve residents’ physical and mental health.

This study has the following shortcomings. First, we used the proportion of permanent residents as a proxy for the urbanization rate. In addition to the population level, the economic development level and land use should also be considered. The selection of this variable needs to be further improved in future study. Second, the estimated results did no distinguish the effect of urbanization on different sub-populations, which will be addressed in further studies.