Introduction

Background

The hukou system (also known as the household registration system) is a household-based population management policy implemented in China (Liao & Zhang, 2021). This system records basic information (e.g., name, birth date, family relationship, marital status, and legal address). Hukou is divided into rural hukou and urban hukou based on residence and blood inheritance.

The rapid development of information networks has accelerated the flow of capital and labor in various regions and even worldwide, thereby promoting the process of urbanization globally. Since the 21st century, China has also been experiencing rapid urbanization in two forms: the urbanization of hukou and the urbanization of the permanent population. There are significant differences between them. According to the data released by the National Bureau of Statistics of China, in 2018, the urbanization rate of China’s hukou was 43.37%, and the urbanization rate of the permanent population was 59.58% (Liu et al., 2020). The Communiqué of the Seventh National Population Census (No.7), released by the National Bureau of Statistics of China in 2021, shows that as of the end of 2020, there were 640.95 million people with an urban hukou, accounting for 45.40% of the total population. Concurrently, there were 901.99 million permanent urban residents, accounting for 63.89% of the total population. Thus, the growth rate of hukou is lower than that of the permanent population. This “incomplete urbanization” has led to increasingly significant social problems.

The hukou system and implications

The China Household Registration Regulations, promulgated in 1958, marked the beginning of a nationwide hukou system, which limits the flow of rural populations into cities (Liu et al., 2020). Since the implementation of Chinese policies of reform and accessibility, the preconditions for hukou conversion have been gradually relaxed; however, the hukou system is still linked to the distribution of benefits (Wu, 2002). Additionally, it mainly involves employment, education, housing, medical care, and social security (Wu & Wallace, 2021). Residents with urban hukou often occupy an advantageous position in the distribution of benefits, and can access more resources (Brugiavini et al., 2018), resulting in unfair treatment towards residents with rural hukou (Zhao, 2017). The welfare benefits of many cities are exclusively reserved for residents with a local urban hukou, while those with a rural hukou who live and work locally cannot enjoy the same resource allocation and welfare benefits (Tani, 2017; Tong & Piotrowski, 2012). The “othering” created by the hukou system, which categorizes individuals as deserving or undeserving, potentially has a significant impact on the most vulnerable groups in society, especially older adults (Jensen, 2019), such as affecting their access to welfare and benefits. On the one hand, the hukou system not only determines the distribution of social welfare but also influences the allocation of other essential resources like education, housing, healthcare, and employment (Kuang & Liu, 2012). Older adults holding urban hukou often have access to better healthcare resources and community services, which are vital for their happiness. On the other hand, the inequality within the hukou system might limit the freedom of rural older adults to pursue their goals, thereby undermining their equality of opportunity (Jensen, 2019). For example, rural older adults are often disadvantaged regarding national pensions and other welfare provisions (Williamson et al., 2017).

Furthermore, the disparity in benefits caused by the hukou system has prompted many rural residents to take the initiative to convert their hukou to an urban one, which requires certain preconditions. For example, in 1992, according to relevant regulations, the urban hukou department provided homebuyers, many investors, and talents with the opportunity to obtain an urban hukou, which was called the “lanyin hukou” (Li et al., 2010; Tong & Piotrowski, 2012). In addition, some residents with a rural hukou have passively converted to an urban one because of adjustments to the government’s hukou policy. Recently, the Chinese government implemented a series of policies to narrow the gap between urban and rural areas, including the integration of urban and rural social security, poverty alleviation, and new rural construction. As a result, public resources have begun to lean toward rural areas, and the welfare gap between rural and urban residents has gradually narrowed. Moreover, rural hukou residents can usually enjoy the dividends of the village collective. Therefore, many people no longer envy the urban hukou but insist on retaining the rural hukou (Liu et al., 2020).

Happiness

The unique hukou system in China, which leads to urban-rural disparities in resource allocation (Chan & Wei, 2019), affects the distribution of benefits and welfare for older adults, thereby playing a crucial role in influencing the mental health of older adults in China (Miao & Bierman, 2023). However, with the narrowing of the welfare gap, the mental health of older adults with different hukou statuses may also be impacted, and this effect might be reflected in happiness, an important indicator of mental health.

Before conducting research on happiness, it is essential to have a clear and precise understanding of the concept. Generally, happiness, as a subjective phenomenon, must be defined from a human perspective (Lyubomirsky et al., 2005), aiming to understand an individual’s emotional and cognitive evaluation of their life (Douma et al., 2021). Additionally, existing literature often considers the term “happiness” synonymous with the concepts of subjective well-being and quality of life (Salas-Vallina et al., 2018), with many studies defining it from three aspects: frequent positive affect, high life satisfaction, and infrequent negative affect (Diener, 1994). Therefore, an individual’s assessment of happiness depends, on the one hand, on their overall perception of their life (Kahneman et al., 2010; Ralston et al., 2018), and on the other hand, on the frequency and intensity of the positive and negative emotions they experience in daily life. This means that happiness is closely related to personal life experiences.

Research objectives and contributions

Given the diversity in hukou types and the various means of obtaining the current hukou, older adults in China experience different living environments and life experiences, which may lead to variations in the perception of happiness. Consequently, considering the influence of urban-rural disparities on the transition of hukou types, predominantly from rural to urban hukou, this study aims to explore the impact and differences in the influence of urban hukou and the various means of obtaining it on the happiness of older adults. It also seeks to further analyze the internal mechanisms of this influence.

The potential contributions of this study are twofold: First, theoretically, by investigating the relationship between the possession of urban hukou, the means of obtaining urban hukou, and the happiness of older adults, it clarifies the mechanisms of influence and the differences therein, thereby addressing the gap in research on the impact of hukou category and acquisition methods on the happiness of older adults in China. Second, practically, it aids in understanding and assisting older adults who acquire urban hukou to better adapt to urban life and enhance their happiness. Additionally, it provides policy insights for government departments to improve the happiness of older adults with rural hukou.

Literature review and research hypotheses

According to existing research, global research on urban-rural differences in happiness has mainly focused on three aspects: (1) different effects of living in urban or rural areas on happiness, (2) different effects of having an urban or rural hukou on happiness, and (3) mediators affecting the happiness of people living in urban or rural areas or having an urban or rural hukou. The details are presented in Table 1. In summary, scholars have extensively researched the urban-rural differences in happiness. However, most studies have only explored the impact of the hukou system on the happiness of related groups at a macro level, lacking in-depth research and mechanism analysis on the influence of urban hukou and the various ways of obtaining it on the happiness of older adults.

Table 1 Overview of Relevant Studies

First, because the hukou system is a unique population management system in China, in addition to studies focusing on China, other related studies have investigated the different effects of living in urban or rural areas on happiness in various countries. Currently, there are some conflicting results in the research on the differences between urban and rural happiness. Gerdtham and Johannesson (2001) found that residents who lived in rural areas were happier than those in urban areas. Some scholars have come to similar conclusions (Berry & Okulicz-Kozaryn, 2011; Knight et al., 2009; Sasaki, 2018); however, others have found the opposite. Amorim et al. (2018) observed that urban retirees are happier than rural ones. Similarly, Li et al. (2021) studied residents of 28 Chinese provinces and found that living in cities positively affects happiness. A study of older adults in Malaysia demonstrated similar findings (Shah et al., 2021). In addition, some scholars have found no difference in happiness levels between people who live in urban areas and those who live in rural areas (Pholphirul, 2014).

Second, in the study of the different effects of having an urban or rural hukou on happiness, some studies have focused on the effect of hukou conversion and the conversion path on happiness. Knight et al. (2009) found that migrant workers (urban migrants who live and work in cities for a long time but do not have an urban hukou) were not as happy as rural and urban residents because their high expectations for urban life could not be fulfilled (Knight & Gunatilaka, 2010). However, when migrant workers have an urban hukou, their happiness improves, particularly male, low-educated, low-income, and land-contracted migrant workers (Liu et al., 2020; Tani, 2017; Zhao, 2017). Some scholars have subdivided the ways of obtaining an urban hukou and have found that the happiness of residents who obtained an urban hukou through education and employment is higher than that of urban aborigines. Conversely, residents who were forced to change their hukou because of land acquisition are not happier (Han et al., 2022). Therefore, this study proposes the following hypotheses:

Hypothesis 1

Older adults with urban hukou have a higher level of happiness compared to those with rural hukou.

Hypothesis

a: Older adults who actively convert to urban hukou have a higher level of happiness compared to those with rural hukou.

Hypothesis

b: Older adults who are born with urban hukou have a higher level of happiness compared to those with rural hukou.

Hypothesis

c: Older adults who passively convert to urban hukou have a higher level of happiness compared to those with rural hukou.

Finally, in terms of the analysis of the factors affecting the happiness of people living in urban or rural areas or having an urban or rural hukou, existing research has determined various mediating factors such as regional patterns, social relations, life expectations, socioeconomic status, and relative income. In their study of the mediating effect of various variables on migrant workers’ happiness, Bonnefond and Mabrouk (2019) found that regional patterns and social relations played a mediating role. In China, megacities and coastal provinces have better employment opportunities and higher wages, which may be important reasons for the positive impact of living in these areas on some migrant workers’ happiness. Though living in cities can be difficult for migrants who are away from their families and friends, keeping in touch with family members can increase their life satisfaction, which, in turn, positively impacts their subjective happiness. In a study of the factors that exerted a mediating effect on the relationship between residents who had gained an urban hukou due to land acquisition and happiness, self-rated socioeconomic status and life expectations were confirmed to play both mediating and inhibiting roles (Han et al., 2022). A low self-rated socioeconomic status indirectly led to a decline in residents’ happiness, while high life expectations suppressed the decline in happiness due to land acquisition to a certain extent. In addition, Zhu et al. (2020) verified the mediating effect of relative income on urban and rural older adults’ happiness.

As described above, scholars have conducted extensive research on urban-rural differences in happiness. However, most studies have only examined the influence of living in urban or rural areas on the happiness of related groups at a macro level or have focused on migrant workers. There is a lack of studies on the influence of an urban hukou and the different ways of obtaining an urban hukou on the happiness of older adults, as well as on the mechanism underlying this impact. Therefore, evaluating the happiness of older adults is helpful for determining whether an urban hukou affects this happiness, exploring the differences in the impact of different ways of obtaining an urban hukou and their impact paths, and providing theoretical support for the formulation of relevant public policies aimed at older adults. Consequently, this study proposes the following hypothesis:

Hypothesis 2

Class identity and income are the pathways through which the ways of acquiring urban hukou influence the happiness of older adults.

Materials and methods

Data

This study used data from the National Survey Research Center at Renmin University of China (NSRC). The NSRC organizes and implements the Chinese General Social Survey (CGSS) every two years. To obtain an adequate sample size, the CGSS data for 2013, 2015, and 2017 were selected for this study. The survey adopted the multi-level stratified PPS random sampling method to collect data systematically and comprehensively at the society, community, family, and individual levels. Ultimately, 100 county-level units and five major cities were selected, and 12,000 people were surveyed. Given that the subjects of this study are citizens aged 60 and above, we initially excluded observations of individuals younger than 60 years old. To enhance the robustness of our research findings, we further removed any missing data from the independent variables, dependent variables, and control variables. Additionally, to mitigate the impact of outliers and other anomalous samples on our research outcomes, we applied a 1% trim to the study data, in line with existing research (Lien & Balakrishnan, 2021). These stringent data preprocessing steps resulted in a final sample size of 10,954. Please refer to Fig. 1 for specific steps. Our instrumental variables were derived from the data of the Sixth National Population Census conducted by the National Bureau of Statistics (Fig. 1).

Fig. 1
figure 1

Data Filtering

Variables

Dependent variable

Happiness was the dependent variable. Referring to Yin and Liu (2020), this variable was obtained from the answer to the question, “Generally speaking, do you think your life is happy?” in the CGSS questionnaire. There were five valid answers: “very unhappy,” “relatively unhappy,” “not very happy,” “relatively happy,” and “very happy.” Each answer was assigned a value of 1 to 5, with higher values representing greater happiness of the respondents.

Independent variable

Hukou was the independent variable and was obtained from the question, “Your current hukou status is…” in the CGSS questionnaire. Options included “agricultural hukou,” “resident hukou (formerly agricultural hukou),” “non-agricultural hukou,” “lanyin hukou,” and “resident hukou (previously non-agricultural hukou).” The first two responses were regarded as rural hukou and assigned a value of 0, and the last three were regarded as an urban hukou and assigned a value of 1.

Considering that there are many types of acquisition methods of an urban hukou, different types of acquisition methods may have differentiated effects on individual happiness. Referring to existing research (Qian et al., 2020; Wang et al., 2021; Wu & Zheng, 2018), this study further divided urban hukou into urban hukou at birth (always), active conversion to an urban hukou (active), and passive conversion to an urban hukou (passive). Individuals born with an urban hukou have always enjoyed its benefits. Individuals actively converted to an urban hukou are often qualified to do so through their own efforts, which enables them to feel psychologically satisfied and accomplished. However, individuals who had passively converted to an urban hukou did so under the influence of external forces or even against their will. This may result in the loss of social resources, bringing about various negative emotions. We considered those who obtained an urban hukou through “studying,” “joining the army,” “working,” “transferring to another job,” and “purchasing an urban hukou, or purchasing a house” as having actively converted, and an urban hukou by “land acquisition (including change of village residence),” “family members transfer (including through marriage),” and “hukou reform, local agricultural hukou will no longer be available” as passive conversion.

Control variables

Considering the study theme, factors affecting happiness, and previous research, the control variables in this study included gender, age, religion, ethnicity, self-rated health, marital status, children, social activities, social trust, and province (Nanor et al., 2021; Pholphirul, 2014; Sørensen, 2021).

Mediating variables

Referring to previous studies (Islam et al., 2009; Welsch, 2003), this study mainly considered the influence of two variables—class identity and income—as well as the ways of obtaining hukou, on happiness. Class identity was obtained from the answer to the question, “In general terms, in the current society, which level of society are you in?” in the CGSS. The upper class and lower class were 1 and 0, respectively. Income status was obtained from responses to the question “What was your total personal income last year?” in the CGSS and the logarithm was taken (Bossert et al., 2022).

Model selection

Ordinary least squares model

To investigate the influence of hukou on older adults’ happiness, an ordinary least squares (OLS) model was first used for preliminary estimation. The model was set as follows:

$${happiness}_{i}={\alpha }_{1}+{\beta }_{1}{hukou}_{i}+{\delta }_{1}{X}_{i}+{\epsilon }_{i},$$
(1)

where \({happiness}_{i}\) represented the happiness of the іth respondent; \({hukou}_{i}\) represented the type of hukou of the ith respondent; \({X}_{i}\) represented a series of control variables; and \({\beta }_{1}\) was the coefficient to be estimated, which can reflect the size and direction of the effects of hukou type on the older adults’ happiness.

Propensity score matching model

In studying the effect of hukou type on older adults’ happiness, there may have been an endogeneity problem of reverse causality. Therefore, this study adopted the propensity score matching (PSM) method proposed by Rosenbaum and Rubin (1983) to test the robustness of the relationship between hukou type and the happiness of older adults. The analysis was mainly divided into three steps:

First, the propensity score was calculated through the following logit regression model:

$$PS\left(X\right)={Pr}\left\{D=1|X\right\}=E\left\{D\right|X\},$$
(4)

where PS was the propensity score, and \(D\) was a dummy variable for the type of individual hukou. If the individual’s hukou type was urban, \(D\) = 1, otherwise, \(D\) = 0. X was a covariate affecting individual hukou type.

Second, the three methods of nearest neighbor matching, kernel matching, and radius matching were used to match the treatment group and the control group according to the propensity score and to calculate the happiness effect of hukou type.

The third step was to calculate the average treatment effect on treated of the treatment group:

$$ATT=E\left({happiness}_{1}|D=1\right)-E\left({happiness}_{0}|D=0\right),$$
(5)

where \({happiness}_{1}\) represented the happiness score of the respondents with an urban hukou; \({happiness}_{0}\) represented the happiness score of the respondents with a rural hukou; \(ATT\) was the difference between the happiness score of the respondents with an urban hukou and the happiness score of the respondents with what is assumed to be a rural hukou. The difference between the happiness scores of older adults was the net effect of an urban hukou on older adults’ happiness.

Instrumental variable model

To effectively mitigate the bias in regression coefficient estimates caused by omitted variables, this study has controlled for as much individual-level information as possible from the survey data. However, there might still exist a bidirectional causality issue between urban hukou, its acquisition pathways, and the happiness of older adults. Accordingly, this study, referencing existing literature (Ullah et al., 2021), attempts to employ the instrumental variable (IV) method to address this potential endogeneity issue. The chosen IV for this study is the 2010 regional urbanization rate of hukou, whose validity is primarily supported in two aspects. Firstly, an individual’s hukou type is correlated with their region’s hukou urbanization rate (Zhang et al., 2020). Due to data limitations, only data from the year 2010 were selected. Following the logic of existing studies (Yao et al., 2016), a region’s hukou urbanization rate is also strongly correlated with its earlier hukou urbanization rates. Therefore, the 2010 regional hukou urbanization rate satisfies the relevance requirement with the endogenous explanatory variable. Secondly, since the economic reforms, hukou mobility has been less strictly regulated, becoming increasingly influenced by marketization and industrialization. Consequently, earlier hukou urbanization rates are likely to be entirely exogenous. In summary, this study posits that the 2010 regional hukou urbanization rate can serve as a valid IV for the type of hukou.

Mediation effect model

Referring to existing research (Baron & Kenny, 1986), to test the potential mediation effect, this study constructed the following model based on model (1):

$$Mediatin{g}_{i}={\alpha }_{2}+{\beta }_{2}{hukou}_{i}+{\delta }_{2}{X}_{i}+{\epsilon }_{i}$$
(2)
$${happiness}_{i}={\alpha }_{3}+{\beta }_{3}{hukou}_{i}+\gamma Mediatin{g}_{i}+{\delta }_{3}{X}_{i}+{\epsilon }_{i},$$
(3)

where \(mediatin{g}_{i}\) represented the mediating variable. Based on previous analyses, this study used class identity and income as mediating variables. The interpretation of other variables was consistent with model (1).

The first step was to test the significance of \({\beta }_{1}\), and if it was significant, to proceed to the second step; if it was not significant, there was no mediation effect, and the test was stopped. The second step was to test the significance of \({\beta }_{2}\) and γ. If both were significant, there was a mediation effect. The third step was to test the significance of \({\beta }_{3}\). If \({\beta }_{3}\) was significant and less than \({\beta }_{1}\), then there was a partial mediation effect; if \({\beta }_{3}\) was not significant, then there was a complete mediation effect. At this point, there was no direct effect of \({hukou}_{i}\) on \({happiness}_{i}\), only an indirect effect (Fig. 2).

Fig. 2
figure 2

Study Flow Chart

Results

Descriptive statistics

Table 2 shows the descriptive statistics of the data. Overall, the respondents’ average happiness score was 3.878. In terms of the independent variables, there were 6,652 respondents with a rural hukou and 4,348 (39.6%) with an urban hukou. Among them, 671 respondents actively converted to an urban hukou, 477 passively converted, and 3,051 were born with an urban hukou. The gender distribution was relatively balanced (49% male). There was a high proportion of Han people, and 72.3% of the respondents were married.

Table 2 Variable Definitions and Descriptive Statistics

Benchmark regression

Table 3 presents the results of the baseline regression models. Model 1, using hukou as the independent variable, explores the impact of different hukou types on the happiness of older adults. The results indicate that, compared to older adults with rural hukou, those with urban hukou experience higher levels of happiness, with a difference of 0.14 units, and the difference is statistically significant (p < 0.01). Model 2 builds upon Model 1 by adding a series of control variables. As per Model 2, older adults with urban hukou have a happiness level that is 0.075 units higher than those with rural hukou, and this difference is statistically significant (p < 0.01). This suggests that urban hukou significantly enhances the happiness of older adults, even after adjusting for demographic, social, and regional characteristics. Hypothesis 1 was verified.

In Models 3, 4, and 5, we conducted segmented regression analysis for older adults with urban hukou. These individuals were categorized into three groups based on how they acquired their urban hukou: active conversion, passive conversion, and those who had urban hukou at birth. In these models, older adults with urban hukou were assigned a value of 1, while those with rural hukou were assigned 0. The analysis shows that, compared to those with rural hukou, older adults who actively converted to urban hukou experienced a significant increase in happiness by 0.101 units, with this increase being statistically significant (p < 0.01). However, there was no significant difference in happiness between older adults who passively converted to urban hukou and those with rural hukou. Similarly, older adults who had urban hukou at birth exhibit a higher level of happiness by 0.085 units than those with rural hukou, and this difference is also statistically significant (p < 0.01). Therefore, actively obtaining an urban hukou, as well as having an urban hukou from birth, significantly increases the happiness of older adults, while the happiness gain from passively converting to urban hukou is less apparent. Therefore, hypotheses 1a and 1b were verified, while hypothesis 1c was not confirmed.

Table 3 Benchmark Regression Results

Robustness test

Empirical results of PSM model

The variation in happiness may have been due to the many ways in which urban hukou holders differed from rural hukou holders; thus, there was a self-selection problem. Therefore, if we only used regression analysis to investigate the influence of hukou type on older adults’ happiness, the results would be prone to bias. Accordingly, this study used the PSM method to examine the relationship between hukou type and older adults’ happiness. Before performing propensity value matching, a balance check is required. Table 4 shows the results of the balance test, which investigated that the standardized deviations of the variables were all less than 10% after matching (i.e., the balance test was passed).

After passing the balance test, this study used different matching methods to calculate the ATT value: (1) K-nearest neighbor matching, where K was set to 1; (2) Kernel matching: this study adopted the default kernel function and bandwidth; and (3) Radius matching to position the caliper range at 0.01. Table 5 indicates that the regression coefficients remained consistent with the benchmark regression results under the three matching methods, that is, the benchmark regression results were robust to a certain extent.

Table 4 Balance Test Results
Table 5 Treatment Group Mean Treatment Effect

Empirical results of IV method

Table 6 reports the two-stage least squares (2SLS) estimation results, utilizing the 2010 regional hukou urbanization rate as an instrumental variable for hukou type. Column (1) presents the baseline regression results, column (2) details the first-stage regression findings of the instrumental variable, and column (3) delineates the second-stage regression outcomes. The first-stage regression reveals a significant correlation between the 2010 regional hukou urbanization rate and the type of hukou. Additionally, with the first-stage F-statistic value being greater than 10, the instrumental variable chosen for this study is confirmed as a robust instrument, not a “weak instrument.” The second-stage regression results show a significantly positive relationship between hukou type and the happiness of older adults when estimated using the instrumental variable. Notably, the estimated coefficient for hukou type is larger than that in the baseline regression, suggesting that potential endogeneity issues may have led to an underestimation of the positive impact of hukou type on the happiness of older adults.

Table 6 IV Method: 2SLS

Mechanism analysis

The above results demonstrate that an urban hukou, including both active conversion to urban hukou and having an urban hukou at birth, significantly enhances the happiness of older adults. This raises the question of the mechanisms through which this impact occurs. To investigate the potential influencing mechanisms further, we explored “class identity” and “income” as two potential mediators.

Table 7 reports the mediation results for older adults with urban hukou. Model 1 reveals a significant positive correlation between possessing an urban hukou and a higher class identity, with an estimated coefficient of 0.084 (p < 0.01). When class identity is added to Model 2, the coefficient estimate for the impact of hukou on happiness marginally decreases to 0.045, retaining its significance. This suggests that class identity serves as a mediating factor between hukou and happiness. Similarly, Model 3 shows a significant positive correlation between owning an urban hukou and higher income levels, with an estimated coefficient of 2.455 (p < 0.01). Including income in Model 4 results in a slight decrease in the coefficient estimate for hukou’s effect on happiness, yet it remains significant. This indicates that income also plays a mediating role between hukou and happiness.

Models 1–4 in Table 8 report the mediation mechanism results for older adults who actively converted to urban hukou. Model 1 shows a significant positive correlation between active conversion to urban hukou and higher class identity, with an estimated coefficient of 0.118 (p < 0.01). In Model 2, which includes class identity, the coefficient for the impact of active conversion to urban hukou on happiness decreases from 0.118 in Model 1 to 0.065. This decrease suggests that class identity acts as a mediator in the relationship between active conversion to urban hukou and happiness. Concurrently, Model 3 reveals a significant positive correlation between active conversion to urban hukou and higher income levels, with an estimated coefficient of 2.432 (p < 0.01). In Model 4, which includes income, the coefficient for active conversion to urban hukou on happiness decreases from 2.432 in Model 1 to 0.074. This decrease indicates that income plays a mediating role in the relationship between active conversion to urban hukou and happiness.

Models 5–8 in Table 8 present the mediation results for older adults with urban hukou at birth. Model 5 indicates a significant positive correlation between having an urban hukou at birth and higher class identity, with an estimated coefficient of 0.084 (p < 0.01). In Model 6, which includes class identity, the coefficient for the impact of having an urban hukou at birth on happiness decreases from 0.084 in Model 5 to 0.059. This decrease suggests that class identity mediates the relationship between having an urban hukou at birth and happiness. Similarly, Model 7 shows a significant positive correlation between having an urban hukou at birth and higher income levels, with an estimated coefficient of 2.648 (p < 0.01). In Model 8, which includes income, the coefficient for having an urban hukou at birth on happiness decreases from 0.059 in Model 6 to 0.055. This further decrease implies that income also acts as a mediator in the relationship between having an urban hukou at birth and happiness. Therefore, hypothesis 2 was verified.

Table 7 Mechanism Analysis Results (Hukou)
Table 8 Mechanism Analysis Results (Active, Always)

Considering the potential limitations of the traditional stepwise method in testing mediation effects, we opted for a more robust approach by employing the Bootstrap method to assess the mediation effect. This method has been regarded as one of the more reliable testing techniques in recent years (Wen & Ye, 2014). As shown in Table 9, the test results with the upper and lower bounds of the BootCI not encompassing 0 provide strong evidence for the existence of the aforementioned mediation mechanism.

Table 9 Mediation Effect Test

Heterogeneity analysis

To further explore how the relationship between hukou type and happiness is moderated by various demographic and social factors, this study conducted an in-depth analysis of the heterogeneity in the impact of urban hukou on the happiness of older adults across dimensions such as age, ethnicity, religious beliefs, and regional distribution. Table 10 presents the detailed results of these heterogeneity analyses.

In terms of age, the findings indicate that for older adults under 70, holding an urban hukou does not significantly increase their happiness. Conversely, for those aged 70 and above, urban hukou significantly enhances their happiness. This trend is observed in both subgroups: those who actively converted to urban hukou and those with urban hukou at birth. With respect to ethnic identity, the results reveal that urban hukou significantly boosts the happiness of Han older adults, but this effect is not evident among minority ethnic older adults. These heterogeneity effects in both subgroups align with the overall effect of urban hukou. In the realm of religious beliefs, older adults without religious beliefs show a significant increase in happiness following the acquisition of an urban hukou, whereas this effect is not significant among those with religious beliefs. Notably, older adults who actively converted to urban hukou align with the overall sample, while those born with urban hukou do not show significant heterogeneity in this aspect. Regarding regional distribution, the results indicate that older adults in non-Eastern regions experience a substantial increase in happiness after obtaining urban hukou. However, for those in Eastern regions, this effect is not significant. Interestingly, the heterogeneity effects in the subgroups of those who actively converted to urban hukou and those born with urban hukou do not entirely correspond with the overall sample.

Table 10 Heterogeneity Analysis Results

Discussion

The relationship between an urban hukou, the method of obtaining it, and the happiness of older adults

Overall, compared to older adults with a rural hukou, those with an urban hukou were happier, including both those who actively converted and those who were born with an urban hukou. However, there was no significant correlation between passive conversion to an urban hukou and older adults’ happiness. This may be because older adults who took the initiative to convert to an urban hukou generally obtained it in their early years through education, career achievements, and wealth accumulation. In addition to obtaining asset benefits, such as housing, with the help of an urban hukou, they may have had a sense of psychological satisfaction and achievement due to the attainment of this active choice goal and were consequently happier. Older adults who passively convert to an urban hukou typically lose the benefits of rural collectives, which are usually only given to those with a rural hukou in the collective. Once their hukou is converted, they often no longer enjoy rights such as collective dividends and land contracts, which have long-term negative effects that extend into old age. Concurrently, it is difficult for those who passively convert to an urban hukou to enjoy the hidden benefits because of the lack of the necessary education, skills, and wealth accumulation. Therefore, such individuals are often not willing to convert their hukou originally, and their happiness may decline (Liu et al., 2020). This decrease in happiness may cancel out the happiness effect of an urban hukou and lead to the lack of a significant relationship between older adults who passively converted to an urban hukou and happiness.

The mediating role of class identity and income

Through the mechanism analysis, it emerged that class identity and income were the mediating variables of the happiness of older adults with an urban hukou at birth and active urban hukou conversion. The analysis also revealed that income had a mediating influence on the happiness of older adults with an urban hukou at birth.

Social class identity was significantly positively correlated with happiness (Yin & Liu, 2020). Compared with older adults with a rural hukou, those born with an urban hukou had always enjoyed the convenience it provides, which made them more integrated into the city. Residents’ urban integration had a significant positive correlation with happiness (Li et al., 2018). An external manifestation of a high degree of urban integration was class identity, so being born with an urban hukou was significantly positively correlated with the happiness of older adults by affecting their class identity. In addition, the opportunity to formally move from rural to urban areas through hukou conversion has always been scarce, and older adults who had voluntarily switched to an urban hukou had been given a personal promotion. This enabled them to perform even better than urban natives in terms of labor capacity (Wu & Treiman, 2007). After actively switching, they gained a greater sense of achievement and higher self-recognition, which further improved their levels of happiness.

In terms of income, research indicates that there is a positive relationship between income and personal happiness (Asadullah et al., 2018; Liu et al., 2020). In China, older adults born with urban hukou and actively convert to an urban one are in a significantly advantageous position in terms of income. For most older adults who are born with urban hukou, their work experience in the city enables them to live on pensions. According to policy, as they become older, they can receive higher pensions (Zhu et al., 2020). However, older adults with a rural hukou mainly rely on continued labor or support from their children for income, and the older they are, the lower their income (Dang, 2018). Compared with rural hukou older adults, the income of those with an urban hukou is higher and more stable. For most older adults who actively convert to urban hukou, the ability to initiate such a conversion reflects, to a certain extent, their nature of work, living conditions, and income level. In other words, they often obtain urban hukou through employment or property purchase (Zhang et al., 2019), indicating a higher income level. Compared to older adults with rural hukou, not only do they have higher incomes and more savings, but they are also eligible for more substantial pension benefits, which can significantly enhance their happiness. Therefore, income is a possible way to affect the happiness of older adults with an urban hukou at birth.

Conclusion

This study utilized data from the CGSS for the years 2013, 2015, and 2017 to explore the impact of obtaining urban hukou on the happiness of older adults in China, particularly focusing on the effects and variations due to different acquisition pathways. Furthermore, the study substantiated the mediating roles of class identity and income. The empirical findings demonstrate that urban hukou exerts a significantly positive influence on the happiness of older adults. This positive effect is predominantly evident among those who were either born with urban hukou or underwent positive conversion to urban hukou. Comprehensive analysis indicated that older adults with urban hukou demonstrated higher levels of happiness compared to those with rural hukou. Further exploration revealed that the routes of acquiring hukou significantly affected the happiness of older adults. Specifically, older adults who actively converted to urban hukou and those born with urban hukou exhibited significantly higher levels of happiness than those with rural hukou. However, no significant difference in happiness levels was observed among older adults who passively changed to urban hukou compared to those with rural hukou. The results of the mediation effect test indicate that owning urban hukou enables older adults to enhance their happiness through strengthened class identity and improved income. Importantly, class identity and income are key mediating variables influencing the happiness of older adults either born with or having undergone positive conversion to urban hukou.

The study’s conclusions provide valuable insights for both government and social organizations. Firstly, the government is encouraged to recognize that the hukou system contributes to urban-rural disparities, affecting social stability and population mobility. Refining policies to reduce the welfare gap between urban and rural hukou, especially by improving pension and healthcare provisions for rural hukou holders, is vital for enhancing their happiness. Additionally, considering the varied impacts of different hukou conversion pathways on happiness, the government should pay special attention to the needs and perspectives of older adults involved in passive conversions, ensuring their respectful treatment and proper resettlement. Secondly, social organizations, acknowledging the disadvantaged position of older adults with rural hukou in terms of social and medical security, should proactively initiate public service projects in rural areas, aiming to improve medical and care services for them.

Future research may delve into defining public policies and comparing the hukou system with other institutional systems. This includes analyzing the implications of reforms in the hukou system and the development of public services in rural areas, and assessing their effects on the happiness of older adults. Additionally, the relationship between the hukou system and social security, as well as medical insurance system, will be explored to understand their impact on individual life quality.

This research has the following limitations: (1) panel data were not used to explore the causal mechanism; (2) only observable selection biases were controlled for, and there may be unobservable selection biases; and (3) the mediating mechanism of how urban hukou acquisition affects happiness needs further exploration. These limitations point the way for further research.