Introduction

Ensuring public physical and mental health is essential to achieving the United Nations’ sustainable development goals. Failure to achieve this goal and optimize citizens’ physical potential would pose significant risks, particularly for low-income and middle-income countries. In recent years, there has been an increasing trend in environmental degradation, directly resulting from the rise of human activity (Wang et al. 2023). This trend unavoidably inflicts damage on inhabitants’ physical and mental health, and severely affects humanity’s ability to achieve sustainable development (Balsalobre-Lorente et al. 2023; Shah et al. 2023a). China’s rapid economic growth and urbanization have led to excessive resource consumption and environmental pollution (Xiong and Xu 2021). Numerous studies have documented various types of environmental pollution, including air pollution, water pollution, and solid waste pollution in different regions (Li et al. 2022a; Yang et al. 2018). Of all these types, air pollution is the most visible form of pollution that residents encounter in their daily lives (Vallero 2014). Prolonged exposure to air pollution can result in various health issues, such as decreased cardiac pumping capacity (Li et al. 2016), acute myocardial infarction (Bhaskaran et al. 2021), and cognitive decline (Brabhukumr et al. 2020). Besides negatively impacting physical health, multiple studies worldwide have also established a direct association between air pollution and increased risk of death among residents (Pandey et al. 2021; Hekmatpour and Leslie 2022). Particularly in some developing countries, air pollution has emerged as a nationwide risk factor for all-age mortality and life loss among residents (Hafeez et al. 2023).

Compared with air pollution, since pollutants such as heavy metal elements and sulfides in water do not have water turbidity, the public’s intuitive perception of water pollution is relatively vague (Riedel et al. 2022). There are two primary sources of exposure to water pollution. One is contaminated water that residents directly drink (Jalan et al. 2009), and the other is eating crops produced after irrigation with contaminated water (Habeeb and El-Tarabany 2018; Zhou et al. 2020a). Water pollutants include ammonia nitrogen, nitrides, phosphides, phenols, and heavy metals (Chidichimo et al. 2020). Organic compounds affect the body’s internal circulatory system (Wu 2020; Hasan et al. 2019) and have serious carcinogenic effects on important human organs (Hendryx et al. 2012; Esquivel-Ferriño et al. 2018). Heavy metals in water, such as lead, mercury, cadmium, and chromium, can also cause cancer (Albanese et al. 2008; Nyambura et al. 2019). Heavy metals in water, such as lead, mercury, cadmium, and chromium, not only cause cancer but also harm the nervous system (Huang et al. 2021), cardiovascular system (Jennrich 2015), and reproductive system (Hardneck et al. 2018). The common solid waste pollution in residents’ lives is mainly domestic and industrial waste. Such pollutants are generally accompanied by a pungent stench and can make people judge, and memory and thinking abilities decrease significantly (Heaney et al. 2011). Since the types of pollutants the public is exposed to in daily life are not unique, it is necessary to explore the changes in public health under the influence of multiple pollutants.

China’s unbalanced energy structure is an essential factor leading to environmental pollution. Coal is the most important source of energy in China (Ma 2015). The incomplete combustion of coal produces toxic gases such as carbon monoxide, while coal contains nitrogen, sulfur, phosphorus, fluorine, chlorine, and arsenic. Elements such as chlorine and arsenic will produce highly toxic compounds after oxidation, which will further cause harm to the human body (Zhou et al. 2020b). China has vigorously developed renewable energy in recent years to solve environmental pollution. Renewable energy can replace some fossil energy to control environmental pollution and promote the health of residents (Sattler et al. 2018; Jaffar et al. 2023). Researchers in different countries have also found that renewable energy positively affects the environment and health. Sadka’s (2008) research shows that biomass energy, as a renewable energy source, can be used through technological improvements to improve third-world countries’ environment and health problems. Arthur et al. (2011) studied the effect of biogas on Ghana, finding that biogas can reduce environmental pollution and improve the health of residents compared to the direct use of wood. Nawab et al. (2021) studied the environmental, economic, and health impacts of renewable energy in six ASEAN countries. They found that renewable energy could largely reduce carbon emissions and environmental pollution caused by economic growth and improve national health. The study by Shah et al. (2023a, 2023b) also supports the view that developing renewable energy can promote the health benefits of residents (Shah et al. 2023b). However, some researchers have found that developing renewable energy affects the environment and health. Pedersen and Larsman’s (2008) study shows that wind power stations will produce inevitable noise pollution, which is harmful to the health of nearby residents. Research by Ronny and Hanne (2016) also confirms this view. The existing research on renewable energy in China mainly focuses on economic growth, sustainable development, carbon emissions, and environmental pollution (Li et al. 2022b). There are few quantitative studies on the impact of renewable energy on residents’ health. Considering the increasing trend of renewable energy in China and the importance of health to the sustainable development of residents and the country, it is necessary to study the impact of renewable energy on health.

The Covid-19 pandemic has underscored the urgency of examining residents’ physical and mental health, particularly as it poses significant risks to residents (Su et al. 2022; Micah et al. 2023). In response to the virus outbreak, countries worldwide have implemented strict lockdown measures, leaving social media as the only tool for communication among residents. Studies have demonstrated that social media use can influence the mental health of individuals of various ages. Given this consideration, investigating the impact of renewable energy on the physical and mental health of residents after the pandemic is now more imperative than ever (Abbas et al. 2023).

Does renewable energy affect residents’ health? Will this effect vary depending on the gender, age, etc., of the residents? If renewable energy can promote residents’ health, can renewable energy make up for the loss of residents’ health caused by environmental pollution? To answer these questions, we used the survey data of China’s CFPS to examine the impact of environmental pollution and renewable energy on the health level of 20,694 respondents in the region from 2012 to 2018. The research sample covered 25 areas in China, covering different types of adults aged 16–99. The sample size is large, and the respondents are widely distributed. Because there was more than one pollutant in the living environment exposed by residents, it was essential to evaluate the impact of various pollutants on residents’ health. Unfortunately, previous studies on environmental pollution have not paid enough attention to this issue. Based on this, we considered that residents might be exposed to pollutants in daily life and studied the impact of 18 kinds of environmental contaminants on residents’ health.

The structure of this paper is as follows: The second section is the model construction and data source; the third section is the research results of environmental pollution and renewable energy on residents’ health; the fourth section is the discussion of the results; and the last section is the main conclusion.

Method, model, and variables

Method

Study population

We used resident health data from the China Family Panel Studies (CFPS). The CFPS is a nationally representative large-scale micro household survey conducted by the China Social Science Survey Center of Peking University. The survey was conducted every 2 years. It aims to reflect the changes in China’s society, economy, population, education, and health by tracking and collecting individual, family, and community data and providing a data basis for academic research and public policy analysis (Liu et al., 2022). The CFPS survey sample covers 33,000 individuals in 25 provinces in China, and its hierarchical multi-stage sampling design enables the model to represent the Chinese population. The CFPS was implemented by the Chinese Social Science Survey Center (ISSS) of Peking University and was supported by the National Population and Family Planning Commission, the National Bureau of Statistics, Shanghai University, Sun Yat-sen University, Lanzhou University, and the University of Michigan Social Research Center. The project uses computer-aided survey technology to conduct visits to meet diverse design needs, improve access efficiency and ensure data quality (Wang et al. 2022a).

To ensure the accuracy and continuity of the study, we screened 20,694 respondents based on their ID numbers who participated in the CFPS health survey from 2012 to 2018. The observation data of the same individual for several consecutive years can more accurately assess the impact of environmental pollution and renewable energy on individual health.

Entropy method

We used the entropy method to measure the comprehensive environmental pollution index (Ma et al. 2015). First, the entropy method calculates the index weight according to the amount of information on each index data in the sample, which can effectively avoid the subjectivity of index selection and weighting and has higher credibility than the subjective weighting method (Tan and Zhang 2015). Second, environmental pollutants are complex and numerous, covering the three aspects of solid, gaseous, and liquid so that the entropy method can be used for weighting analysis. Therefore, we used the entropy method to empower and evaluate the index system. The specific steps are as follows:

  1. 1.

    Arrange n evaluation indexes from m samples into the original data matrix: X = (xij)m × n(1 ≤ i ≤ m, 1 ≤ j ≤ n).

  2. 2.

    The data are dimensionless and processed to make them comparable. We choose the optimal extreme value processing method: \({k}_{ij}=\frac{\max \left({x}_{ij}\right)-{x}_{ij}}{\max \left({x}_{ij}\right)-\min \left({x}_{ij}\right)}\left(i=1,2,\cdots, m;j=1,2,\cdots, n\right)\).

  3. 3.

    Calculate the weight matrix of the index system: \({p}_{ij}=\frac{k_{ij}}{\sum_{i=1}^mk{i}_j}\left(j=1,2,\cdots, n\right)\).

  4. 4.

    Calculate the entropy value of each index: \({e}_j=-h\sum_{i=1}^m\left({p}_{ij}\times Ln{p}_{ij}\right),h=\frac{1}{Lnm}\). In the calculation of entropy value, if pij is 0, and the logarithmic calculation cannot be carried out, the mean difference method is used to add 1 and then the logarithmic calculation is carried out.

  5. 5.

    Calculate the difference coefficient: gj = 1 − ej(j = 1, 2, ⋯, n).

  6. 6.

    Calculating indicator weights :\({w}_j=\frac{g_j}{\sum_{j=1}^n{g}_j},\sum_{j=1}^n{w}_j=1\).

  7. 7.

    Calculate the comprehensive score level of each sample :\({S}_i=\sum_{j=1}^n{w}_j\times {k}_{ij},0\le {S}_i\le 1\).

Model

We adopt the comparative study of control variables to study the impact of environmental pollution and renewable energy on residents’ physical and mental health. This method is a common method related to health research (Zhang et al., 2022). To study the impact of environmental pollution and renewable energy on residents’ health, we constructed a fixed effect model of panel data as follows:

$$\textrm{PH}{\textrm{Y}}_{it}=\alpha +{\beta}_0\ast E{P}_{it}+{\beta}_1\ast R{E}_{it}+{\beta}_i{\sum}_{i=2}^n\textrm{Contro}{l}_{it}+{\theta}_i+{\xi}_{it}$$
(1)
$$\textrm{ME}{\textrm{N}}_{it}=\alpha +{\beta}_0\ast E{P}_{it}+{\beta}_1\ast R{E}_{it}+{\beta}_i{\sum}_{i=2}^n\textrm{Contro}{l}_{it}+{\theta}_i+{\xi}_{it}$$
(2)

Where i represents the individual residents, t represents the year, PHY represents the physical health of residents, MEN represents the mental health of residents, EP represents the comprehensive environmental pollution index of the area where the residents are located, RE represents the production and consumption of renewable energy in the area where the residents are located, Control represents the control variable, θi represents the fixed effect, and ξit represents the residual term. Drawing on the research methods of Zhang and Zhao 2014, Luo et al. 2021, Ullah et al. 2020, and Khan et al. 2021, the control variables we select that may affect the health of residents include annual income (INC), years of education (EDU), gender (GEN), marital status (MAR), type of residence (URB), age (AGE). Due to the different dimensions of different variables, we first standardized the variables before conducting empirical analysis to ensure the accuracy and comparability of regression coefficients.

Explained variable: physical health (PHY)

The residents’ physical health data in this study come from the CFPS database. Existing literature on the use of CFPS survey data to study residents’ health, with most studies using health status scores to indicate respondents’ health status (Yang et al. 2021; Zhou et al. 2021; Wang et al. 2022b; Wen 2019). Some residents, especially low-income groups, rarely undergo physical examinations, and often overestimate their physical health. In addition, male residents in particular are more likely to overestimate their physical condition to avoid family concerns due to the presence of other family members during the survey. Therefore, we contended that only using this set of data to indicate residents’ health is not rigorous enough. The CFPS survey data also published other data on the health status of respondents: the health status of respondents, which is evaluated by investigators on the physical health status of respondents. These data can reflect the external health status of the respondents, such as respiratory rate, brain response, concentration, limb coordination, etc.

We combine these two sets of health data to evaluate the health of residents. The respondents’ evaluation data of self-health are divided into five grades, which are 1–5 points. Investigators’ external health evaluation of respondents has a total of 7 levels, (which) are 1–7 points. The lower the score, the worse the health status. We added the two sets of data to obtain the total health score of the respondents, which is used to indicate the physical health status of the respondents.

Explained variable: mental health (MEN)

The World Health Organization (WHO) stated in 2001 that mental health is a state of health or well-being in which individuals can achieve themselves, cope with normal life stress, work productively, and contribute to their societies (Kanowski et al. 2009). Poor mental health is often accompanied by psychiatric problems, such as depression, anxiety, fear, and excessive drinking (Bogan and Fertig 2013). We used a simplified CES-D scale to measure family mental health, and Radloff (2016) and Aamir and Winkel (2021) confirmed its good reliability and validity. In the survey, respondents were asked how often the following behaviors or feelings occurred in the last week: (1) I felt depressed; (2) I find it difficult to do anything; (3) My sleep is not good; (4) I feel happy; (5) I feel lonely; (6) I live happily; (7) I feel sad; and (8) I feel that life cannot continue. Respondents need to choose among four options: (1) almost none (less than one day); (2) sometimes (1–2 days); (3) often (3–4 days); and (4) most of the time (5–7 days). We quantified the scores based on these answers, as shown in the Table 1. After summing the CES-D score, an initial value between 0 and 30 is obtained. The higher the score, the better the mental health of the respondents.

Table 1 Respondents’ mental health ratings

Explanatory variable: environmental pollution (EP)

Studies use a single variable or a few variables to evaluate environmental pollution (Goyal and Canning 2021; Zhu et al. 2021). However, in real life, residents were exposed to more than one source of pollution, so it was not reasonable to use a single variable or a few variables to assess environmental pollution to some extent. The common types of pollutants can be divided into three categories: solid, gas, and liquid. We believe that it is necessary to comprehensively study the impact of these three types of pollutants on residents' cognitive abilities. Therefore, 18 major environmental pollutants were selected, including chemical oxygen demand, ammonia nitrogen, total nitrogen, total phosphorus, petroleum, volatile phenol, lead, mercury, cadmium, hexavalent chromium, total chromium, arsenic, PM2.5, sulfur dioxide, nitrogen oxides, smoke (powder) dust, solid waste, and hazardous waste. These 18 environmental pollutants cover three categories of solid, gas, and liquid, which can fully reflect the environmental pollution situation in the region. We used the entropy method to synthesize these 18 types of environmental pollutants into an environmental pollution index, representing the region’s environmental pollution. The larger the value is, the more serious the environmental pollution in the area.

Explanatory variable: renewable energy (RE)

We used the ratio of renewable energy consumption to total energy consumption in the region to reflect the renewable energy (RE) indicator. This has two purposes: one is to reflect the region’s renewable energy production, and the other is to reflect the region's energy structure. Our choice of renewable energy sources is water, wind, and solar. We used the hydropower, wind, and solar power generation data in various provinces and cities in the 2012–2018 China Energy Statistical Yearbook to calculate the total renewable energy output. Since renewable energy production in the statistical caliber is the amount of electricity incorporated into the grid, renewable energy production is renewable energy consumption.

Annual income of respondents (INC)

Since too much data on personal income are missing from the CFPS Personal Survey data, the CFPS Household Survey data include all respondents’ total annual household income and per capita annual household income. Considering the significant differences in the number of families of different respondents, we do not use the total household income of the respondents as a proxy variable for annual income but choose to use the total household per capita income as a proxy variable for the personal income of the respondents. The survey content of ‘total work income’ is the total income of the respondents after deducting taxes and insurance and housing fund in the last year, including all wages, bonuses, cash benefits, and in-kind subsidies.

Years of schooling (EDU)

We used the CFPS survey data for ‘highest education’ to reflect the education level of respondents. Because the result of the highest degree is text data, it cannot be directly quantified. We converted the corresponding education degree to the number of years of education. The specific conversion table is shown in Table 2.

Table 2 Converted to years of education

Respondent gender (GEN)

We used the CFPS survey data for ‘personal gender’ to reflect the respondent’s gender. In the modeling process, the male was assigned a value of 1, and the female was assigned a value of 0.

Marital status (MAR)

We used the CFPS survey data for marital status to reflect the marital status of respondents. In the CFPS survey data, there are a total of five marital statuses: unmarried, married, cohabitation, divorced, and widowed. To facilitate the quantitative analysis, in the process of modeling analysis, we assign ‘having a spouse (married)’ and ‘cohabitation’ to 1 according to whether the interviewee is accompanied and assign ‘unmarried,’ ‘divorced,’ and ‘widowed’ to 0.

Type of residence (URB)

We used the type of residence in the CFPS survey data to reflect the respondent’s residence type. If the respondents live in the town, the assignment is 1. If the respondents live in the countryside, the assignment is 0.

Age of residence (AGE)

CFPS survey data contain the year of birth (code: 10), from which we calculate the age of the respondents as a control variable. The descriptive statistics of the research sample are shown in Table 3.

Table 3 Definition and statistical characteristics of variables

Data sources

All the survey data in this paper are from the CFPS database (HTTP://www.issss.pku.edu.cn/cfps). All these data come from the statistical data of the CFPS database in 2012, 2014, 2016, and 2018. The data of 18 environmental pollutants for calculating the environmental pollution index are derived from the 2012-2018 China Statistical Yearbook.

Results

Temporal and spatial evolution of environmental pollution and renewable energy

Overall, the degree of environmental pollution in China during the study period showed a slow rise and then decreased largely (Fig. 1). In 2012, the level of environmental pollution in most areas of China was moderate or above. Beijing had the lowest level of environmental pollution in the country. Nevertheless, the most polluted areas were distributed around Beijing (Fig. 1a). In 2014, China’s overall environmental pollution level did not change significantly compared with 2012, and even the environmental pollution in Anhui Province and Jiangsu Province deteriorated compared with 2012 (Fig. 1b). In 2016, China’s environmental pollution significantly improved compared with 2014. The only province with higher pollution was Shandong Province, and the only province with high pollution was Jiangsu Province (Fig. 1). The degree of environmental pollution in 2018 was largely improved compared to 2016. There were no provinces with high pollution in the country. Only Shandong Province and Jiangsu Province had higher pollution levels, and the pollution levels of the remaining provinces were all in the middle level and below (Fig. 1d).

Fig. 1
figure 1

The evolution of environmental pollution. ad Respectively represent the environmental pollution status in China for the years 2012, 2014, 2016, and 2018

The proportion of renewable energy in China’s total energy consumption shows a distinct growth trend. The relatively high areas are mainly Gansu Province, Sichuan Province, Yunnan Province, Guizhou Province, Hubei Province, Guangxi Province, and Fujian Province (Fig. 2). These areas’ high share of renewable energy is mainly due to their specific geographical location. Gansu Province is located in northwest China; it has a large area, a large temperature difference between day and night, and abundant wind resources suitable for constructing large-scale wind power stations. Sichuan Province, Yunnan Province, Guizhou Province, Hubei Province, and Guangxi Province, the geographical gap between the five regions, rich in water resources, is very suitable for constructing permanent hydropower stations. Additionally, Fujian has deployed a large number of offshore wind power projects.

Fig. 2
figure 2

The evolution of renewable energy. ad Respectively represent the renewable energy consumption status in China for the years 2012, 2014, 2016, and 2018

Impact of environmental pollution and renewable energy on residents’ health

Environmental pollution impacts residents’ PHY (IC = − 0.0911, P = 0.000), indicating that the more serious the environmental pollution is, the worse the PHY of residents in the region. Every unit increase in environmental pollution will lead to a decrease of 0.0911 units in residents’ PHY. Renewable energy significantly impacts residents’ PHY (IC = 0.2585, P = 0.000), indicating that renewable energy can improve residents’ PHY. Each unit increase in renewable energy will increase the PHY of residents by 0.2585 units. Income and years of education can significantly promote residents’ PHY. Men generally have a higher PHY score, approximately 0.0817 higher than women (P = 0.000). The average PHY of urban residents was 0.0171 units higher than that of rural residents. Marriage positively impacts residents’ PHY (IC = 0.0120, P = 0.000), meaning that married people score higher on their PHY. The older the residents are, the lower the PHY. For every 2 years of age increase, the PHY of residents will decrease by 0.3122 (P = 0.000).

Environmental pollution has a negative impact on the MEN of residents (IC = − 0.0566, P = 0.000), indicating that the more serious the environmental pollution is, the worse the residents in the region. Every unit increase in environmental pollution will lead to a decrease of 0.0566 units in residents’ MEN. Renewable energy significantly impacts residents’ MEN (IC = 0.1847, P = 0.000), indicating that renewable energy can improve residents’ MEN. Each unit increase in renewable energy will increase the MEN of residents by 0.1847 units. Income and years of education can largely promote the MEN in residents. Men generally have a higher score, approximately 0.0576 higher than women on average (P = 0.000). Different residences of residents have distinct differences in MEN (P = 0.000). The middle MEN of urban residents was 0.0526 units more elevated than that of rural residents. Marriage significantly impacts residents’ MEN (IC = 0.1018, P = 0.000), meaning married people score higher on their MEN. The older the residents are, the higher the MEN. For every 2 years of age increase, the MEN of residents will increase by 0.0349 (P = 0.000).

In comparison, the harm of environmental pollution to physical health is greater than that to mental health (− 0.0911 < − 0.0566). This shows that environmental pollution has a more severe impact on health. The contribution of renewable energy to physical health is more significant than that to mental health (0.2595 > 0.1847) (Fig. 3). Therefore, the active development of renewable energy can promote the health of residents.

Fig. 3
figure 3

Effects of environmental pollution and renewable energy on health. PHY represents physical health, MEN represents mental health

Impact of different genders

Environmental pollution can largely damage male and female residents' physical and mental health (P = 0.000), and renewable energy can promote physical and mental health (P = 0.000). The impact coefficient of environmental pollution on the health of male residents was − 0.0847, and the impact coefficient on female residents was − 0.0995, indicating that for every 1% increase in environmental pollution, the damage to the health of residents was 0.0847% and 0.0995%, respectively. The influence of environmental pollution on male residents’ mental health was − 0.0761, and that on female residents was − 0.0386. The influence coefficient of renewable energy on the health of male residents was 0.2664, and the influence coefficient on the health of female residents was 0.2567, which exceeds the damage of environmental pollution to health. Renewable energy has a similar effect on residents’ mental health. The influence coefficient of male residents was 0.2228, and female residents were 0.1492.

Impact of different places of residence

Environmental pollution can significantly damage urban and rural residents’ physical and mental health (P = 0.000), and renewable energy can promote the physical and mental health of urban and rural residents (P = 0.000). The harm of environmental pollution to urban residents’ physical health was − 0.0801, and to rural mental health was − 0.0282. The contribution of renewable energy to urban residents’ physical health was 0.2978, and to mental health was 0.1611. The damage of environmental pollution to the physical health of rural residents was − 0.0987, and the damage to rural mental health was − 0.0796. The contribution of renewable energy to rural residents' physical health was 0.2442 and to mental health was 0.1964. The environmental pollution damage to rural residents’ physical and mental health was more severe than that of urban residents. Renewable energy plays an essential role in promoting the physical health of urban residents but has a negligible minor effect on the mental health of urban residents.

The influence of different ages

In this study, the age difference was divided according to the age division that the World Health Organization determines. Young people are under 44 years old, middle-aged people are between 45 and 59 years old, and elderly people are over 60. Environmental pollution negatively affects different age groups’ physical and mental health (P = 0.053). Renewable energy can significantly promote other age groups’ physical and mental health (P = 0.000). Unlike empirical cognition, environmental pollution has the most significant harm to young people (IC = − 0.1101) and the least harm to the health of elderly individuals (IC = − 0.0738). Renewable energy contributes the most to the health of elderly people (IC = 0.2941) and the least to young people (IC = 0.2389). Renewable energy contributes the most to the mental health of young people and the least to the mental health of middle-aged people. The impact of environmental pollution and renewable energy on residents’ mental health has no apparent regularity, which reflects the complexity and variability of mental health factors.

The influence of different educational backgrounds

Here, the primary school and below is a low degree, middle school to university is an intermediate degree, and university and above is a high degree. Environmental pollution can damage people’s physical and mental health with different educational backgrounds (P = 0.000). Renewable energy can promote the physical and mental health of people with different educational backgrounds (P = 0.000). Environmental pollution largely harms low-educated people’s health (− 0.1057) and minor damage to the health of high-educated people (− 0.0569). On the other hand, renewable energy greatly affects the health of highly educated people (IC = 0.6396) and has the least effect on the health of less educated people (IC = 0.2527). Similarly, the impact of environmental pollution and renewable energy on residents’ mental health does not have apparent regularity due to different educational backgrounds.

Endogenous analysis

To address endogeneity concerns, we utilize instrumental variables in our study. Using econometric methods, we examine the effects of renewable energy and environmental pollution on residents’ physical and mental health. Our findings indicate that renewable energy can mitigate the harmful effects of environmental pollution on residents’ health. Nevertheless, because residents’ demands for physical and mental health can influence the development of renewable energy as well as the control of environmental pollution, both renewable energy and environmental pollution are endogenous variables in our model. Therefore, utilizing quantitative methods can lead to biased results.

Our study involves two endogenous variables, namely renewable energy (RE) and environmental pollution (EP). It is essential for the instrumental variable to be associated with the endogenous explanatory variable but not with the dependent variable. The interest expenditure of high energy consumption and high pollution industries can reflect the degree of environmental pollution. Generally, higher interest expenditure indicates more severe environmental pollution. Therefore, we employ the interest expenditure of high energy consumption and high pollution industries as the instrumental variable for environmental pollution. Energy infrastructure investment plays a crucial role in the development of renewable energy. Typically, increased investment in energy infrastructure promotes the development of renewable energy, which does not directly link with the residents’ health. Thus, we use the amount of energy infrastructure investment as an instrumental variable for renewable energy. The regression results are presented below.

We employed the 2sls method to address endogeneity concerns, and the results are presented in Table 4. The findings indicate that even after using instrumental variables, renewable energy continues to mitigate the detrimental effects of environmental pollution on residents’ physical and mental health, which supports our previous research conclusions.

Table 4 Results of instrumental variable regression

Discussion

By studying the physical and mental health status of 20,694 residents in China from 2012 to 2018, we found that environmental pollution can significantly inhibit the physical and mental health of residents. Every unit increase in environmental pollution will lead to an average decrease of 0.0911 units in PHY and 0.0566 units in MEN. Renewable energy has an essential role in promoting residents’ health. Each additional unit of renewable energy will increase PHY by an average of 0.2585 units and MEN by an average of 0.1847 units. Although there are also articles that quantitatively study the impact of pollution on residents’ health, most of these articles focus on one aspect of environmental pollution (Pandey et al. 2021; Jalan et al. 2009; Hendryx et al. 2012). Considering that residents live in a multipollutant environment, it is more realistic to assess the impact of different types of pollution on residents' health as much as possible.

Our study finds that compared with mental health, environmental pollution is more seriously damaging to physical health. With the accumulation of toxic substances and the decline in physical function caused by age, physical health worsens. Renewable energy has the most significant contribution to health, and the contribution of renewable energy to health is larger than the damage of environmental pollution to health (0.2585 > 0.0911), which indicates that it is urgent to develop renewable energy actively. However, from the perspective of the spatial and temporal evolution of China’s renewable energy (Fig. 2), China’s current renewable energy is still dominated by hydropower, wind power, and solar energy. Although the proportion of renewable energy has increased, it is unfair for residents in areas with weak resource endowments. Limited by natural conditions, these areas do not have perfect conditions for developing hydropower, wind power, and solar energy. However, residents in these areas have even suffered more severe environmental pollution (Fig. 1).

Promoting the development of renewable energy plays a crucial role in the physical and mental health of residents. The Covid-19 pandemic has not only damaged people’s physical health but also posed severe risks to their mental well-being. Social isolation and lockdown measures have caused significant changes in people’s lifestyles and daily activities, which may trigger anxiety, depression, and feelings of loneliness (Abbas 2020). The restrictions on outdoor activities and reduced exposure to sunlight due to the pandemic have resulted in a lack of exercise and vitamin D deficiency among residents, leading to an increase in both physical health issues and mental illnesses (Abbas 2021). The utilization of renewable energy reduces reliance on traditional fossil fuels, thereby decreasing air pollution and environmental degradation. Green environments have been proven to have a positive impact on people’s emotions and mental well-being, alleviating negative feelings such as anxiety and depression.

More attention should be given to the impact of environmental pollution on women’s physical and men’s mental health. Previous studies have focused more on the harm of environmental pollution to public health. Our research showed that mental health is vulnerable to environmental pollution, and men’s mental health should be taken seriously. Renewable energy positively contributes to residents’ mental health, making up for the mental health damage caused by environmental pollution.

The health problems of rural residents should also be taken seriously. Although few seriously polluted factories are in rural areas, the pollution generated in family life cannot be ignored. Although, compared with urban residents, rural infrastructure construction is weaker, whether it is the availability of renewable energy or garbage disposal, rural residents, compared with urban residents, still have a large gap. The fuel used by rural residents in cooking is mainly coal, wood, etc., which are more exposed to air pollution from cooking and more likely to cause health damage. The fact that renewable energy contributes less to the health of rural residents than to the health of urban residents also supports this view to some extent (Figs. 4 and 5). In this regard, we suggest that we should strengthen infrastructure construction in rural areas, especially power infrastructure construction. China’s existing urban–rural dual structure negatively impacts residents’ mental health. Under the background of urban-rural residence, rural residents have fewer job opportunities, and their children are less likely to access high-quality educational resources. These factors lead to rural residents’ depression and a lower sense of self-worth (Zhang et al. 2021).

Fig. 4
figure 4

Effects of environmental pollution and renewable energy on health of different genders

Fig. 5
figure 5

Effects of environmental pollution and renewable energy on the health of people in different residential areas

Contrary to existing research conclusions (Sanhueza et al. 2009), we found that environmental pollution is more harmful to the physical and mental health of young people than older people, and renewable energy contributes more to the health of older people than young people (Fig. 6). This finding indicates that environmental pollution control is imminent. Young people live under tremendous pressure and need to work. Compared with elderly individuals, they have more time to go out and are more exposed to environmental pollution. The elderly do not need to work, and time can be freely controlled. When the external environment is seriously polluted, the elderly can stay at home and enjoy the convenience of renewable energy.

Fig. 6
figure 6

Effects of environmental pollution and renewable energy on the health of people of different ages

More targeted policies are needed to help low-educated people reduce the risk of exposure to environmental pollution and enhance their access to renewable energy. With the improvement of education, the damage of environmental pollution to health is gradually decreasing, and the contribution of renewable energy to health is increasing progressively (Fig. 7). This means that less educated people are more vulnerable to environmental pollution than highly educated people while enjoying less renewable energy convenience. Low-educated people do not have much choice when looking for work, and some of the more polluting jobs, or outdoor work, are carried out by low-educated people. This finding is consistent with the research findings of Iorember et al. (2022), who investigated the impact of human capital on residents’ health in the Middle East and North Africa (MENA) countries and found that human capital has a significant positive effect on health. The mental health problems of highly educated people cannot be ignored. Environmental pollution largely damages the mental health of highly educated people. A possible reason is that the working environment of highly educated people is more complex, work pressure is more significant, and mental health is affected by more factors (Fergusson et al. 2007). Renewable energy contributes the most to the mental health of highly educated people. Therefore, we suggest that the government vigorously strengthen the construction of renewable energy.

Fig. 7
figure 7

Effects of environmental pollution and renewable energy on the health of people with different educational backgrounds

This study matched macro-level data on environmental pollution and renewable energy with micro-level survey data on residents. The most acceptable approach should be to measure the degree of environmental pollution individuals suffer each year and the amount of renewable energy used in real life. However, this approach is not practical, especially for more than 20,000 individuals. Many existing articles on micro issues have also adopted the same approach as ours (Sun et al. 2017; Ding and Buhs 2017; Li et al. 2018; Li et al. 2022a; Gu and Pu 2019). There were only 25 regions involved in the study, and the number of individuals was 20,694, with an average of 827 individuals per region. Additionally, the proportion of gender and residence in the total sample of individuals we selected was close to 1:1, and a sufficient number of individuals can fully guarantee the heterogeneity of individual geospatial distribution. Therefore, we believe that in the absence of better data sources, the existing matching methods can meet the basic needs of research and study the specific impact of environmental pollution and renewable energy on residents’ health.

Because we adopted the research method of matching macrodata and microdata, it is more important to divide the macroregional attributes as carefully as possible. Therefore, we use provincial-level environmental pollution data, which is rougher than municipal and county-level data. There are two reasons for this approach. One is that the CFPS database published respondents’ residences at the provincial level, and the second is that the current data on renewable energy can only be obtained at the regional level. If the survey data and renewable energy data of respondents at the municipal and county levels can be obtained, the research results will be more accurate.

Conclusion

This study explores the impact of environmental pollution and renewable energy development on public health by combining empirical analysis to systematically reveal the relationship between environmental pollution, renewable energy development, and public health. Moreover, we conducted in-depth research on the health impacts of residents from different genders, ages, and educational levels, which provides important references for relevant researchers. Our study helps scholars deepen their understanding of the impact of environmental pollution and renewable energy development on public health and provides useful references for future research, policy-making, and practice.

Making public health a top priority is crucial for achieving sustainable societal and national development. This study utilized a panel data model to examine the impact of environmental pollution and renewable energy development on the physical and mental health of 20,694 Chinese residents from 2012 to 2016 to determine whether renewable energy can offset the negative effects of pollution. Moreover, the study analyzed how these impacts vary across different types of residents. Results indicate that environmental pollution has a negative impact on residents’ physical and mental health, with physical health being more severely affected. Conversely, renewable energy development has the potential to improve both physical and mental health, with a greater positive impact on physical health than mental health. These findings suggest that promoting renewable energy plays a crucial role in mitigating the negative impact of pollution on residents’ physical and mental health.

A study categorizing respondents into different groups showed that renewable energy can offset the health losses caused by environmental pollution across various types of residents (see Figs. 47). Environmental pollution damage to the physical and mental health of male residents was 0.0847 and 0.0995, respectively, whereas for female residents, it was 0.0761 and 0.0386. On the other hand, the contribution of renewable energy to men’s physical and mental health was 0.2664 and 0.2228, respectively, while those for women were 0.2567 and 0.1492, respectively. Additionally, environmental pollution had a more significant impact on the physical and mental health of rural residents (0.0987 and 0.0796) than urban residents (0.0801 and 0.0282). Conversely, the contribution of renewable energy to the physical and mental health of urban residents was 0.2978 and 0.1611, while those for rural residents were 0.2442 and 0.1964.

Contrary to empirical knowledge, environmental pollution has a greater adverse impact on the health of young people (IC = − 0.1101) and a lesser impact on the health of elderly individuals (IC = − 0.0738). In contrast, renewable energy has the highest contribution to the health of elderly individuals (IC = 0.2941) and the lowest contribution to the health of young people (IC = 0.2389). The impact of environmental pollution and renewable energy on the mental health of residents exhibits no regular pattern, indicating the complexity and variability of mental health factors. Specifically, environmental pollution causes the most significant damage to the health of individuals with lower levels of education (− 0.1057) and the least to those with higher levels of education (− 0.0569). Conversely, renewable energy has the greatest positive impact on the health of highly educated individuals (IC = 0.6396) and the least impact on the health of less-educated individuals (IC = 0.2527). Similarly, the effects of environmental pollution and renewable energy on the mental health of residents do not display an evident pattern due to differences in educational backgrounds.

This study is significant in enhancing our understanding of the impact of environmental pollution on public health. The findings of this research provide guidance for policymakers, emphasizing the need to actively promote renewable energy to mitigate the negative impact of environmental pollution on public health in China. Both environmental pollution and renewable energy development are global issues. The research methods and conclusions drawn from this study can provide valuable insights for other developing countries in terms of environmental protection and sustainable development.

Policy recommendations

Our research on the linkages between renewable energy, environmental pollution, and residents’ health can offer evidence-based support for governments to develop policies related to renewable energy development. Moreover, our study findings on different population subgroups can inform targeted health interventions, including measures to control environmental pollution and bolster renewable energy development.

The government must continue to implement measures to control environmental pollution in various ways, including implementing an environmental protection tax, upgrading industrial structures, promoting green finance, and fostering the development of renewable energy. Although China has made significant strides in controlling environmental pollution, it is paramount to prevent pollution from escalating again.

It is recommended that policymakers increase investment in fixed assets in rural areas, specifically upgrading power grid facilities. By doing so, the power completeness rate in rural areas can be enhanced, reducing the need for residents to resort to non-clean energy sources as a result of frequent power outages.