Can training and apprentice programs in STEM increase worker life satisfaction and optimism?

Background Despite the significant relationship between life satisfaction and education, less is known about the connection between life satisfaction and informal learning in the context of training and apprenticeship programs. This paper examines the influence of the LaunchCode program, a novel training and apprentice pro‑ gram in STEM, on participant’s life satisfaction and optimism. We also explore mediating roles of STEM employment and earnings, as well as moderating role of participants’ educational attainment levels. Results We find high life satisfaction and optimism among those who completed both the training course and the apprenticeship component. In addition, we find a significant mediation effect of STEM employ‑ ment on the relationships between program participation and current life satisfaction, as well as optimism, among the apprenticeship completers. Finally, we find a significant moderation effect of one’s education level on the relationship between program completion and finding a STEM job, such that participants with a college degree are more likely to secure STEM employment through coursework alone. Conclusions Our findings highlight the significance of apprenticeships in increasing life satisfaction and optimism, as well as the importance of STEM employment in explaining the significant effect of apprenticeships on life satisfac‑ tion and optimism. These findings suggest that what people do for a living is more important than how much they earn. However, while apprenticeships may offer an alternative route to the labor market, education may still facilitate connections to STEM employment in the absence of an apprenticeship.


Introduction
Education is a human capital investment that can immediately (e.g., upon graduation) lead to better employment opportunities and increased earnings, as well as continually improving employment and earnings trajectories over time.Beyond employment and earnings, education can lead to better health, improved social relationships, and more stable families (Oreopoulos & Salvanes, 2011).Unsurprisingly, there are a myriad of studies that demonstrate the positive link between education and current life satisfaction (Chen, 2012;Cuñado & de Gracia, 2012;Nikolaev & Rusakov, 2016).Life satisfaction, meanwhile, is also independently linked to better health, longevity, higher earnings, and good social relations (Graham et al., 2004).Most of the research connecting education and current life satisfaction is, however, limited and often based on traditional educational settings, such as K-12 and college education settings (Oreopoulos & Salvanes, 2011).
Page 2 of 18 Chun et al. International Journal of STEM Education (2024) 11:6 To our knowledge, research has yet to formally explore life satisfaction in the context of reskilling and other alternative education programs.Life satisfaction in these programs may diverge from general trends in traditional education programs, as the participants in reskilling and other alternative education programs may be further behind in their new field than they were in their old field.In these programs, it is also important to consider optimism about the future, which tends to be more closely linked with individual investments in the future, such as educational investments, than current life satisfaction (Graham & Pozuelo, 2022).Together, life satisfaction and optimism can gage people's fulfillment in their current lives, as well as in the future.In addition, many reskilling and alternative education programs have both skill acquisition (e.g., coursework) and skill application components (e.g., apprenticeships), which may relate differently to life satisfaction.Furthermore, as individuals often enter these programs to increase their earnings and gain entrance into specific fields, it is important to understand how these programs relate to life satisfaction and optimism through earnings and employment sectors.Moreover, one's educational background may alter the relationship between reskilling programs and life satisfaction and optimism, as one's education could influence the degree to which an individual might feel relatively behind in a new field.This set of issues is increasingly relevant in the context of today's rapidly changing labor market and the challenges these changes pose to lowerskilled workers.To fill these gaps and better understand the relationship between reskilling and alternative education programs, employment, and life satisfaction and optimism, we focus on a novel coding and apprenticeship program-LaunchCode.In particular, we aim to understand the influence of the LaunchCode program on life satisfaction and optimism both directly across different levels of program participation-including course and apprenticeship completion-and indirectly through earnings and employment sectors.We also aim to understand if these influences vary across educational attainment levels.

Education and life satisfaction and optimism
Many scholars have used various terms like "happiness, " "(subjective) wellbeing, " and "life satisfaction/optimism, " interchangeably, especially in the economics literature (Graham, 2011).On the one hand, some measures, such as happiness, follow Jeremy Bentham's notion of hedonic utility gaging how happy people "feel" about their lives.Such measures are interested in people's pleasure or contentment as they experience their lives.On the other hand, other measures, such as life satisfaction and optimism, follow Aristotle's (1935, ca. 350 B.C.E) perspective and view happiness through a eudemonic lens, focusing on the power to control one's destiny or to fulfill one's life.In this regard, they focus on opportunities that lead to a purposeful or meaningful life.Moving away from feelings of happiness per se, we focus on the "pursuit" of happiness, which we believe ought to be in the interest of policy more generally, and particularly education policy.This study explores both current life satisfaction and optimism about the future as proxies for the pursuit of happiness through education-and science, technology, engineering, and math (STEM) education in particular.
The research on education and life satisfaction can be broken down into three categories: (a) direct effects (e.g., does education relate to higher rates of life satisfaction); (b) indirect mediating effects (e.g., what explains the relationship between education and higher rates of life satisfaction); and (c) moderating effects (e.g., how do these relationships differ across groups).

Direct effects of education on life satisfaction
Starting with direct effects, research has shown positive associations between education and life satisfaction.Oreopoulos and Salvanes (2011), for instance, use General Social Survey data from 1972 to 2000 demonstrating that even after conditioning on income, increases in education (i.e., years of schooling) significantly relate to substantial increases in self-reported happiness.More recent research has explored different aspects of life satisfaction.Nikolaev (2018) used longitudinal data from the Household Income and Labor Dynamics in Australia survey to demonstrate the relationship between education and different types of subjective well-being (SWB).According to the analysis, more years of schooling were positively related to perceiving one's life as having more meaning and purpose (i.e., eudaimonic SWB), as well as having more positive and less negative emotions (i.e., hedonic SWB).In addition, the author found that despite being more satisfied with most major domains in life (e.g., financial, communal, familial, etc.), people with more years of schooling are less satisfied with the amount of free time they have.Finally, using degree status (instead of years of schooling), the study shows that even though the SWB returns on higher education increases (e.g., having a college degree is associated with higher rates of SWB than a high school diploma), it does so at a decreasing rate (e.g., the increase in SWB from a college degree to a graduate degree is less than the increase in SWB from a high school diploma to a graduate degree).
Additional research has demonstrated that the relationship between education and life satisfaction is nonlinear.For example, Nikolaev and Rusakov (2016), using Household Income and Labour Dynamics in Australia data, demonstrate that more educated individuals have higher life satisfaction than their less-educated peers, starting in their early to mid-30 s.While "trading" one's present happiness for future happiness ( 2016) is not a direct measure of optimism, it does provide some context for how higher-educated individuals perceive the future (Jabbari et al., 2023b).This is especially important when considering the relative dearth of research on education and optimism when compared to education and life satisfaction.Despite the strong relationship between life satisfaction and optimism (Carver et al., 2010), only a few studies have examined the relationship between education and optimism.For instance, Puri and Robinson (2007) use life expectancy measures as a proxy for optimism in the Survey of Consumer Finances, finding a positive relationship between having a college degree and self-reported life expectancy.Additionally, in one of the only studies to explore reskilling in the context of happiness, Jabbari et al. (2023b) found that reskilling during the pandemic was associated with increases in optimism for Black respondents.

Mediating roles of earnings and employment
Higher-educated individuals are more likely to have a wider range of job opportunities, often with higher salaries and more prestige.Skills gained from education also make individuals more adaptable to changing labor market conditions and less prone to unemployment.As these labor market conditions can expand an individual's social networks and instill a greater sense of control (Verme, 2009), while providing them with more independence at work (Albert & Davia, 2005), research has also explored the indirect relationship between education and life satisfaction through labor market returns.For example, Cunada and Perez de Garcia (2012) use data from the European Social Survey to explore both the indirect and direct effects of education on happiness.Concerning indirect effects, the authors demonstrate that individuals with lower education levels have lower income and employment levels, which are ultimately related to lower levels of happiness (ibid).Moreover, even when accounting for these indirect effects, the authors find that education still has a positive direct effect on happiness, which may reflect the impact that learning new skills has on an individual's self-confidence (ibid).

Moderating roles of the educational and economic contexts of individuals
Finally, research has explored how the relationships between education and life satisfaction vary across groups.While demographic groupings, such as gender (Powdthavee et al., 2015), have been explored in this context, an important conceptual extension involves the educational and economic contexts of individuals and their surrounding communities.For example, using data from the World Values Survey, Salinas-Jimenez et al. (2011), not only demonstrated that educational attainment has a significant effect on life satisfaction net of earnings, but also that these relationships differ across economic conditions.Specifically, the authors find that the relationship between educational attainment and life satisfaction was stronger when fewer people have attained a certain level of education.In this regard, educational attainment can be considered a positional good.Using multilevel regression across 24 countries, Araki (2022) found that the relationship between educational attainment and life satisfaction varied across levels of societal skill diffusion, such that the economic valueand returns on happiness-are lower when skills are higher in a given society.
However, in the literature on life satisfaction, there is little research on the differentiation between education and skills at the individual level-partly because these constructs are rarely measured separately.Nevertheless, as reskilling and alternative education programs continue to increase in response to shifting labor market demands (Credential Engine, 2021), it is important to consider how the impact of these programs on life satisfaction and optimism may vary across standard educational attainment levels (e.g., associate's and bachelor's degrees).While research has yet to explore this phenomenon, it is important to consider the perspectives in which these programs may be viewed in concert with standard educational attainment levels.
One perspective is that of "over-education" in which an individual with a bachelor's degree who earns an additional certificate or credential (for a job in which a bachelor's degree is not a prerequisite) may consider him/ herself as over-educated for the work that they will be doing.Stemming from the research on societal diffusion and framing education as a positional good, these individuals may view their peer or reference group as those with a bachelor's degree.Thus, rather than considering the certificate or credential as a way to "move forward, " these individuals might perceive the certificate or credential to symbolize having to "start over, " which might lower their levels of life satisfaction.Thus, while some might expect life satisfaction to be lower among the over-educated, Voces and Cainzos (2021), used multiple surveys from Spain to demonstrate that over-education did not, in fact, have significant effects on life satisfaction.Still, over-education in the context of short-term education and training programs may signal previous failures in the labor market.As Clark and Oswald (1994) found that individuals with higher levels of education may cope with unemployment less successfully, we might expect life satisfaction to be lower among these individuals.
In this regard, an alternative perspective to over-education in the context of reskilling and alternative education programs is that of "adaptability." Here, an individual with a bachelor's degree who returns to earn a certificate may be more adaptable, and thus we might expect life satisfaction to be higher for these individuals.Using a survey of graduate students in Malaysia, Ng et al. (2020) found that career adaptability-which involves individuals taking control over their careers-was positively associated with life satisfaction.

The role of education content and context
One limitation of the aforementioned research is that the majority of studies demonstrating the relationship between education and life satisfaction do not consider the content of education (Oreopoulos & Salvanes, 2011).This may be especially important in the context of technology reskilling and alternative education programs, which often provide specialized skills to help participants meet specific labor market demands (World Bank, 2017).For example, given the rising demand and expected growth in technology sectors (U.S. Bureau of Labor Statistics, 2022), individuals may be more optimistic about earning a degree, certificate, or other credential in a STEM field.In addition to education content, education context is also important to consider.For instance, education programs that involve internships, apprenticeships, or other types of experimental learning experiences may be especially adept in providing students with opportunities to grow their social networks, which may be related to life satisfaction.Taken together, short-term computer science certificate programs, which have unique content and contextual features, may subsequently have a unique relationship to life satisfaction and optimism.Using qualitative interviews, Seibel and Veilleux (2019) found that many of the women entering short-term computer science certificate programs were previously deterred from majoring in computer science in college due to a lack of knowledge about computer science, lower levels of selfefficacy in computer science skills, and lower rates of female enrollment in computer science courses.Moreover, research by Lyon and Green (2020) demonstrated that short-term computer science certificate programs helped support women's work goals in their current jobs, while also helping them attain aspirational jobs-things they may not have been able to do with traditional education programs.

Science, technology, engineering, and math (STEM) education and employment
Recent reviews demonstrate that STEM education has been interpreted in multiple ways throughout the literature (Martín-Páez et al., 2019).Still, there are common themes in STEM education, such as technology use, interdisciplinary teaching and learning, and realworld application of skills.Rodger Bybee, one of the first scholars to elaborate on the definition of STEM education notes the importance of technology: "A true STEM education should increase students' understanding of how things work and improve their use of technologies" (Bybee, 2010, p. 996).Furthermore, given the multiple content areas in the STEM acronym, it is unsurprising that the National Science Teaching Association (NTSA) advocates for an interdisciplinary approach to teaching and learning STEM (National Science Teaching Association, 2020).Moreover, the NTSA calls for authentic applications of STEM knowledge to solve real-world problems.Computer science, for example, which involves solving problems through coding, represents an authentic application of STEM education.In this regard, the national Hour of Code is an example of computer science's prevalence in STEM education.
Of course, STEM education cannot be separated from STEM employment.1 Indeed, it was the initial report from the National Academy of Sciences, the National Academy of Engineering, and the Institute of Medicine, Rising Above the Gathering Storm, that served as one of the foundational motivating factors for improving STEM education as a way to "Energize and Employ America for Brighter Future" (Institute of Medicine et al., 2007).Similar sentiments were expressed in the National Science Foundation's 2007 report A National Action Plan for Addressing the Critical Needs for U.S. Science, Technology, Engineering, and Mathematics Education System (National Science Board, 2007).In addition to helping advance the US economy and ensure global competitiveness, STEM careers offer some of the highest wages in the economy, as well as some of the highest occupational growth rates (Noonan, 2017).Furthermore, as noted by Jabbari et al. (2023a), given recent technological advancements across multiple employment sectors, acquiring STEM skills is not only a mechanism for achieving economic competitiveness, but also a protective factor against employment displacement.In fact, Manyika et al. (2017) recently estimated that without a dramatic shift in skill development, nearly a quarter of current US workers will face automation-related employment displacement by 2030.Unsurprisingly, computer science and coding make up one of the largest areas of growth in STEM employment (Zilberman & Ice, 2021).
As efforts to broaden participation in STEM (Tsui, 2007;Valla & Williams, 2012) are often housed within our traditional STEM preparation pathways (e.g., 4-year degree programs), they tend to overlook nontraditional students and pathways.Recognizing this shortcoming, new talent preparation pathways in STEM have recently been developed.As a result, alternative STEM preparation programs have rapidly increased in recent years.This is especially true in computer science, which has experienced an influx of short-term certificate programs (Juberg & Mercer, 2023).

STEM education and life satisfaction and optimism
While research has yet to comprehensively explore life satisfaction and optimism resulting from STEM education, research has explored particular elements within STEM education relating to certain aspects of optimism.For example, Olson et al. (2020) found mentor support was significantly linked to mentee career optimism among a sample of STEM graduate students in the United States.Similarly, Ng et al. (2023) found that certain online activities were related to career optimism in an undergraduate aviation course in China.

Study context: the LaunchCode program
This study focuses on LC101, LaunchCode's2 flagship program.LC101 is a part-time, evening coding program that includes 20 weeks of courses, and 12-52 weeks of a paid apprenticeship at a local employer.Aligned with our previous conceptualization of STEM education, in which science, technology, engineering, or math skills are being taught, we consider the LaunchCode program to be a STEM education program.LC101 has used three main benchmarks for admission: admitted students must (1) express an interest in having a career that involves coding; (2) have enough time to attend the course and complete the accompanying assignments, which typically require 15 h/week; and (3) demonstrate proficiency on the HackerRank test, which evaluates both critical thinking and problem-solving skills related to computer programming.
LC101 provides two units: (1) a JavaScript unit focusing on foundational programming concepts and frontend programming and (2) a Java or C# unit focused on web applications.During the course, students develop a portfolio project and enter a "lift-off " phase after graduation that helps students prepare for their apprenticeships, which includes resume building and interview preparation.
Upon successful completion of the program and determination of workforce readiness by LaunchCode staff, LC course completers are provided with an opportunity to start a paid, full-time apprenticeship.During the apprenticeship program, students take the skills that they learned from the course and apply them in a real-world setting with a local employer.The program also allows its graduates to supplement their technical skills with professional skills in the workplace.While not all students start the apprenticeship program and some students start but do not complete the apprenticeship program, apprenticeship positions can often lead to permanent positions.In this regard, the apprenticeship program is perceived to facilitate a more efficient transition to the labor market for graduates.

Hypotheses
Building upon the literature review in the previous section, this study explores the direct and indirect effects of the LaunchCode program on participants' life satisfaction and optimism.Concerning the direct effects, we expect that apprenticeship completion-the application of new skills-will have a larger impact on life satisfaction and optimism than course completion-the learning of new skills.
H1a.Both course and apprenticeship completion will have a positive impact on the life satisfaction and optimism of program participants.H1b.The combined impacts of course and apprenticeship completion will be greater than the impact of course completion alone.
Concerning indirect effects, we expect that the effect of course and apprenticeship completion on life satisfaction and optimism will be explained, in part, by securing STEM employment and experiencing an increase in earnings.
H2a.The effect of the course and apprenticeship completion on life satisfaction and optimism will be partially explained by STEM employment.
H2b.The effect of the course and apprenticeship completion on life satisfaction and optimism will be partially explained by increased earnings.
Finally, we expect that participants' educational attainment levels (i.e., having a bachelor's degree) may alter the relationships among program participation, STEM employment/earnings, and satisfaction/optimism.
H3a.The direct effects of program participation on life satisfaction and optimism will differ across participants' education levels.H3b.The indirect effects of program participation on life satisfaction and optimism will differ across participants' education levels.

Data and variables
This study focuses on nine cohorts of the LC101 program offered in St. Louis MO-the first cohort we observe began in January 2017, and the last cohort started in May 2020.Our data come from two sources-administrative records and surveys.Administrative records provide us with application information including demographic characteristics and entrance exam scores, as well as program information, including course and apprenticeship completion.The administrative data were then used to invite applicants to complete a follow-up survey in the summer of 2021.
The survey was open from April 19, 2021, to August 24, 2021, and asked 100+ questions regarding applicants' demographic characteristics, financial characteristics-including employment and income, and social and emotional characteristics-including life satisfaction and optimism.The median survey response lasted roughly 18 min, and individuals who completed the survey were rewarded with a $10 Amazon gift card.6154 individuals were invited into the survey and 1319 individuals started the survey-a response rate of 21.4 percent. 3Of those who started the survey, 1200 completed it-a completion rate of 91.0 percent.After removing low-quality survey responses, 4 we were left with 1006 respondents.After list-wise deletion, 5 we had a final sample of 870 individuals across nine cohorts.
Our primary treatment variable concerns respondents' program status, which includes four categories (0 = was not admitted; 1 = was admitted but did not complete the course; 2 = completed the course but did not complete the apprenticeship program; 3 = completed the course and the apprenticeship program).Our main outcomes consist of both life satisfaction and optimism, which were measured by the Cantril ladder: "Please imagine a ladder with steps numbered from zero at the bottom to 10 at the top.The top of the ladder represents the best possible life for you and the bottom of the ladder represents the worst possible life for you.Individual income and STEM employment status are the two major mediators in this study.The income variable is measured by respondents' self-reported total pretax employment income in the previous 12 months at the time of the follow-up survey (winsorized at the 99th percentile), 6 while STEM employment is a binary variable (0 = non-STEM employed/unemployed; 1 = STEM employed). 7As a moderator, we construct another binary variable of current educational attainment for those with and without bachelor's degrees (0 = less than a bachelor's degree; 1 = bachelor's degree or higher).In addition to 3 As noted by Jabbari et al. (2023a), these response rates are similar and in many cases greater, than those commonly used in well-established financial surveys, such as the Federal Reserve's Survey of Household Economics and Decision-making (Board of Governors of Federal Reserve System, 2020) and FINRA's National Financial Capability Study (FINRA Investor Education Foundation, 2018).Moreover, based on previous research (See Jabbari et al., 2023a), the analytic sample in this study closely resembles the larger pool of LC101 applicants in terms of gender, race/ethnicity, age, and education level. 4Completed survey responses underwent several quality checks to ensure the reliability of the data.These quality checks involved assessing the speed of responses during the survey and a within-survey commitment exercise to elicit reliable responses. 5Our initial sample included a small proportion of individuals who had missing values in gender (0.1%), race (0.1%) prior STEM employment status (1.1%), prior income (6.2%),prior education level (1.1%), past life satisfaction (5.2%), current life satisfaction (2.6%), life optimism (4.6%), cohort (0.1%), previous coding hours (1.1%), and age (0.2%). 6While prior research has found minimal amounts of bias in the recall of employment income (e.g., Moore et al., 2000), there is relatively little research on the extent to which employment income recall can diminish over longer periods of time.However, as noted by Jabbari et al. (2023a), we would expect any recall bias to operate similarly across groups, resulting in meaningful comparisons.Moreover, the inclusion of cohort controls in our selection models-as explained later-helps account for any recall bias in our results. 7To capture a broad range of STEM employment, we ask participants if their current job involves Science, Technology, Engineering, or Math skills.If participants answer yes to either Coding or Computer Science Skills or to Other Science, Technology, Engineering, or Math Skills, then we consider these participants to be employed in STEM.

Empirical model design
For our analyses, we conducted four models using generalized multivariate path models to explore the direct relationships between LaunchCode participation and life satisfaction and optimism, the indirect relationships between LaunchCode participation and life satisfaction and optimism through STEM employment and earnings (mediation), and the alterations of these relationships across educational attainment levels (moderated-mediation).Stemming from structural equation modeling (SEM) frameworks, path models are used to simultaneously test the significance and strength of multiple hypothesized relationships (Kline, 2015).Unlike traditional path models, generalized path models are able to account for multiple variable types (e.g., continuous, categorical, etc.)-both in terms of outcomes and predictors-in each path.In doing so, generalized path models allow for the estimation of both direct and indirect effects with a variety of link functions and distributions (Dadi et al., 2020).
Following Baron and Kenny (1986), indirect effects are calculated by multiplying the coefficient representing the regression of a given mediator (M) on a predictor (X) with the coefficient representing the regression of an outcome (Y) on that same mediator (M).The multiplication of the two coefficients (M on X and Y on M) ensures that the indirect effects remain unaffected by how the mediator is constructed.Nevertheless, to effectively compare different indirect effects, estimation techniques must be similar (e.g., a comparison of logit and OLS regression coefficients is inappropriate).Thus, in our SEM models, both mediators (STEM employment and income) and both outcome variables (life satisfaction and optimism) are treated as continuous.
In doing so, we employ a linear probability modeling (LPM) approach for the STEM employment mediator, treating the binary variable as continuous when examining the relationships among program participation, STEM employment, and life satisfaction and optimism.In addition to meeting LPM assumptions and aligning with prior research that uses LPM to understand the relationship between program participation and STEM employment (Jabbari et al., 2023a), this approach maintains consistency in the model specifications for both mediation channels, which allows us to appropriately compare the proportions of the indirect effects between these two channels in our effect decomposition estimates.Given our variables and modeling strategies, standardized estimates, which are sometimes used to approximate effect sizes in SEM frameworks, are not feasible.Rather, we use effect decomposition techniques to better understand the relative size of our direct and indirect effects.The decomposition of effects is determined by dividing either the direct or indirect effect by the total effect (i.e., the coefficients for all direct effects plus the coefficients for all indirect effects).

Model 1: ITT direct effects
In our first model, we examine the intent-to-treat (ITT) effects of being accepted into the LaunchCode program on both life satisfaction and optimism.For the ITT impact on life satisfaction and optimism, we employ an instrumental variable (IV) approach (Angrist & Pischke, 2009).In specific, we use participants' entrance exam scores to instrument program participation in a path model that resembles a two-stage least squares (2SLS) model.Here, our identification strategy is based on the assumption that participants' entrance exam scores would be associated with the outcomes of interest (i.e., life satisfaction and optimism) through and only through entering the program.Stemming from Bollen's (2012) review on instrumental variables and Maydeu-Olivares et al. (2020) application of IV strategies to structural equation modeling frameworks, we leverage a path model in which program acceptance affects life satisfaction and optimism, and entrance exam scores affects program acceptance, while the error terms between program acceptance and life satisfaction and optimism are correlated.

Model 2: TOT direct effects
In our second model, we measure treatment on the treated (TOT) effect by examining the extent to which various levels of program participation (e.g., not accepted to the program, accepted to the program but did not complete the course, completed the course but not the internship, completed the course and the internship) affect employment and earning outcomes.However, one challenge with estimating this relationship is that the decisions to complete the program and internship are not random and, unlike the offer of course enrollment, are not solely a function of a readily observable indicator, like the HackerRank score.To account for this potential endogeneity, we employ a matching and weighting technique to statistically balance study participants on an arrangement of observable characteristics.In specific, we use multinomial propensity score weighting (MPSW) 8 to estimate heterogeneous treatment effects "within" the Launch-Code program by the level (or "dose") of one's program participation.
In specific, in our TOT models, we use multinomial propensity score weights to balance participants on a range of observable characteristics that are theoretically related to both treatment assignment and the outcomes under study.These characteristics include the following pre-treatment assignment variables: gender, race/ethnicity, age, educational attainment, coding hours, entrance exam score, cohort, income, STEM employment, and life satisfaction.As seen in the unweighted section in Additional file 1: Appendix A, prior to applying propensity score weights, there exist significant differences between the control group and the treatment groups.For example, when compared to those who were rejected, those who were accepted were more likely to be female, were less likely to be White, had more coding experience, and had slightly lower life satisfaction scores.Moreover, those who completed the course were younger, had higher entrance exam scores, had less income, and had slightly lower life satisfaction scores than those who were rejected.Furthermore, those who completed the apprenticeship were younger, had higher entrance exam scores, had less income, had more coding experience, were less likely to be STEM-employed, and had slightly lower life satisfaction scores than those who were rejected.In addition, compared to the rejected group, all other groups had a slightly higher percentage of participants from earlier cohorts.However, after employing propensity score weights, the results show that almost all variables were effectively balanced across each group.

Model 3: mediation model
In our third model, we explore the mediating effects of Income and STEM employment on the relationships between program participation and life satisfaction and optimism.Mediation effects are calculated as the product of the direct effect of program participation on the moderator (i.e., income and STEM) and the direct effect of the moderator on the outcome (i.e., life satisfaction and optimism).As we assume a partially mediated (rather than fully mediated) model, we simultaneously estimate the direct effects of program participation on life satisfaction and optimism.To ensure that the mediating effects of STEM are not solely a product of income, we estimate these relationships simultaneously.In these TOT models, we again employ our MNPS weights to limit selection bias.

Model 4: moderated-mediation model
In our final model, we moderate the relationships in model 3 with education level.In doing so, we employ a multi-group structural equation modeling (MGSEM) framework to our path models in order to understand the moderating effects of educational attainment (Bowen & Guo, 2012).In specific, we estimate the parameters separately for those with and those without a bachelor's degree at the time of the survey.Because models with new parameter constraints are nested within previous less-restrictive models, likelihood ratio (i.e., chi-squared) difference tests can be used to determine whether or not more-restrictive models have statistically significantly worse levels of fit (Bowen & Guo, 2012).If more-restrictive models do have worse levels of fit, then previous less-restrictive models-where parameters are allowed to vary across groups-are retained (Bowen & Guo, 2012).The parameters that are allowed to vary across groups demonstrate a moderating effect on the group (Bowen & Guo, 2012). 9,10 The data analysis in this study was conducted using Stata (Version 16; StataCorp, 2019), and we used thresholds of α = 0.010, 0.05, 0.01, and 0.001 to assess statistical significance.

Descriptive findings
Table 1 reports summary statistics of the variables in use.In total, 51.3 percent of respondents in our analytic sample identified as female, 60.7 percent were White, 8 Leveraging machine learning techniques and generalized boosted regression to deal with issues of multidimensionality, MPSW calculates individuals' probability (or propensity) of attaining a given program participation level and then balances individuals with different participation levels across a range of observable characteristics (McCaffrey et al., 2013).For our MNPS strategy, we use RAND Corporation's Toolkit for Weighting and Analysis of Nonequivalent Groups (TWANG), developed by Ridgeway et al. (2013).Using a multinomial strategy, we compare individuals who were not accepted (i.e., the control group) to multiple treatment groups: similar individuals that were accepted but did not complete the course; similar individuals who completed the course but not the apprenticeship; and similar individuals who completed the course and the apprenticeship.Average Treatment Effect (ATE) weights were then applied as probability weights in our path model. 9To maintain consistency with path coefficients, LR tests used p-values of less than 0.10 to determine statistical significance. 10As likelihood ratio tests are not permitted in the presence of weights, mediation and moderation models were conducted first to determine structural relationships; then MNPS were added for final models.17.8 percent were Black, 12.4 percent were Hispanic, and 9.1 percent were other individuals, including Asian.The average age of respondents was 36.7 years.22.3 percent of respondents had a Master's degree or higher, 40.5 percent had a bachelor's degree, 19.0 percent had an associate's degree or had attended some college, and 18.3 percent had completed high school or less.Prior to participating in the LaunchCode program, about 32.8 percent of respondents were employed in STEM, and the average annual earnings of respondents were $35,545.3.
Of the 870 survey participants, 42.2 percent did not pass the entrance exam (Rejected).Of those accepted (n = 503), 39.0 percent did not complete the course (Admitted), 44.7 percent completed the course only (Completed), and 16.3 percent completed the course and the apprenticeship (Apprenticed).Before participating in the LaunchCode program, the average score of life satisfaction for those who were not accepted was 4.8, which is slightly higher than the rest of the groups.When considering pre-application income, those who were not accepted earned an annual average of $38,496.0, which was more than the other three accepted groups.Regarding pre-application STEM employment, 34.3 percent of those who were not accepted were employed in STEM, which is slightly lower than the admitted group (37.8 percent) but higher than those who went on to complete the course (31.6 percent), as well as those that went on to complete the apprenticeship (17.1 percent).However, at the time of follow-up, we notice significant differences in respondents' current life satisfaction and optimism.Apprenticeship completers now have the highest scores for both life satisfaction (7.60) and optimism (8.72), whereas course graduates have the second highest scores for both outcomes.In addition, there was a similar change in income and STEM employment across the groups.Apprenticeship completers, which previously had the lowest average yearly income, now have an average income of $63,659.05,which is nearly $20,000 higher than the other three groups.Similarly, apprenticeship completers, which previously had the lowest rates of pre-application STEM employment, had a STEM employment rate of 94 percent following the program.Course completers had the second highest rate of STEM employment following the program, at 57.8 percent.Considering sociodemographic attributes, groups were fairly similar across gender, age, race/ethnicity, and educational attainment.Entrance exam scores were slightly lower in the groups that were not accepted, and fairly similar across the admitted groups.A correlation table among these variables can be found in Additional file 1: Appendix B.

Direct impact of LaunchCode
We first measure the ITT and TOT effects of Launch-Code program participation on the current life satisfaction and optimism about the future (Fig. 1).The ITT models on life satisfaction (Panel A) and optimism (Panel B) do not report a significant causal inference between program acceptance (regardless of program completion) and life satisfaction or optimism.However, our TOT models on life satisfaction and optimism yield different results.After balancing on pre-treatment characteristics across the four subgroups through PSWs, those who completed the LaunchCode course reported a mild but significantly higher level of optimism when compared to those who were not accepted (b = 0.295, p < 0.05).In addition, those who completed the LaunchCode course and the apprenticeship program report higher levels of life satisfaction (Panel C) and optimism (Panel D) (life satisfaction: b = 1.447, p < 0.001; optimism: b = 0.779, p < 0.001).

Mediating impacts of STEM employment match and income
Next, we explore the extent to which STEM employment-representing an industry match-and income explain the varying effects of LaunchCode participation on life satisfaction and optimism.Figure 2 reports the results from our mediation path models with subsequent decomposition effects on life satisfaction (Panel A) and optimism (Panel B).Starting with the life satisfaction model, we find that those who completed the Launch-Code course and apprenticeship were positively associated with STEM employment (b = 0.454, p < 0.001) and income (b = 18.885, p < 0.001), while those who were admitted but did not complete the course were negatively associated with STEM employment (b = -0.137,p < 0.01).Furthermore, we find that having a STEM job and income are positively associated with people's life satisfaction (STEM employment: b = 0.582, p < 0.001; Income: b = 0.011, p < 0.001).As a result, we find positive "indirect" effects on life satisfaction through STEM employment and income among apprenticeship completers (STEM employment: b = 0.264, p < 0.001; Income: b = 0.206, p < 0.001).At the same time, we find a negative indirect effect on life satisfaction through STEM employment among those who were admitted but did not complete the course (b = -0.080,p < 0.05).In addition, we observe a significant direct effect of Apprenticeship completion on life satisfaction (b = 0.976, p < 0.001).
We also estimate the decomposition of the total effects (i.e., the proportion of the total effects that are explained indirectly through the STEM employment and income   Fig. 1 ITT and TOT effects of LaunchCode program on life satisfaction and optimism channels). 11Together the STEM and income channels explain approximately a third (32.5 percent) of the total effects of apprenticeship completion on life satisfaction.Notably, for those who completed the apprenticeship program, the indirect effect sizes through the two channels are quite similar to each other (STEM employment = 0.264, p < 0.001; Income = 0.206, p < 0.001).
Respectively, STEM employment and income channels explain 18.3% and 14.2% of the total effects.The results for optimism are somewhat different.While the association between STEM employment and optimism is positive and significant (b = 0.439, p < 0.001), the association between income and optimism is not significant (b = 0.002; not significant).Given the significant associations with STEM employment among those who were admitted but did not complete the course, as well as those who completed the apprenticeship, we observed significant indirect effects on optimism through STEM employment across these groups (admitted students: b = -0.060,p < 0.05; apprenticeship completers: b = 0.200, p < 0.001).However, even though we found a significant association with income among those who completed the apprenticeship, we did not observe a significant indirect effect on optimism through income among those who completed the apprenticeship.In addition, it is important to note that the optimism model exhibits a significant direct relationship between program participation and optimism among those who completed a course only (b = 0.274, p < 0.05) and those who completed both a course and the apprenticeship (b = 0.563, p < 0.05).Finally, in decomposing the total effects, we find that the indirect effect of STEM employment on 11 Here, it is important to note that effect decompositions-the proportion of the total effects that are explained through indirect effects-are not a demonstration of what is commonly considered "effect sizes." Although, standardized coefficients, which are comment in SEM models, can be used to represent effect sizes in some cases (Bowman, 2012), standardization of coefficients is not currently an option in generalized SEM models.
optimism explains a fourth (25.0%) of the total effect for apprenticeship completers, while the indirect effect of income is small (4.6 percent) and not significant.

Moderating impacts of education
Last, we explore the extent to which these relationships are moderated by educational attainment.In doing so we conduct two sets of subgroup analyses with a partially unrestricted path model (Fig. 3, Panel A1 and A2).
In panel A1, paths reflect relationships for those without a bachelor's degree; in panel A2, paths reflect relationships for those with a bachelor's degree; underlined coefficients are unmoderated and thus consistent across both panels.For life satisfaction, there were four instances of moderation.First, admitted students without a college degree have a positive relationship with life satisfaction (b = 0.476, p < 0.05), while admitted students with a college degree have a negative, non-significant relationship with life satisfaction.Second, while course completers without a bachelor's degree have a negative, non-significant relationship with STEM employment, course completers with a bachelor's degree have a positive significant relationship with STEM employment (b = 0.116, p < 0.05).Third, apprenticeship completers without a bachelor's degree have a larger (positive) relationship with income (b = 27.484,p < 0.001) than apprentices with a bachelor's degree (b = 13.598,p < 0.001).Fourth, those without a bachelor's degree exhibit a larger (positive) relationship between income and life satisfaction (b = 0.017, p < 0.001) than those with a bachelor's degree (b = 0.008, p < 0.001).
The moderation effect between course completion and STEM employment does not lead to a substantially different moderated-mediation effect between course completion and life satisfaction through STEM employment (both groups exhibit non-significant indirect effects).Similarly, the moderation effect between income and life satisfaction does not lead to a substantially different moderated-mediation effect between course admission and life satisfaction, nor between course completion and life satisfaction, through income (both groups exhibit non-significant indirect effects).However, the moderation effect between income and life satisfaction-when combined with the moderation effect between apprenticeship completion and income-does lead to a substantially different moderated-mediation effect between apprenticeship completion and life satisfaction through income: the indirect effects for apprentices without a bachelor's degree is larger (b = 0.473, p < 0.001) than the indirect effect for apprentices with a bachelor's degree (b = 0.108, p < 0.05).
Similar to life satisfaction, there were similar instances of moderation between the course completion group and STEM employment, as well as between apprenticeship completion and income, for optimism (Fig. 3, Panel B1 and B2).Again, the moderating effect between course completion and STEM employment did not lead to a substantially different moderated-mediation effect between course completion and optimism through STEM employment (both groups exhibit non-significant indirect effects).However, the moderation effect between apprenticeship completion and income did lead to a substantially different moderated-mediation effect between apprenticeship completion and optimism through income: the indirect effect for apprentices without a bachelor's degree is significant (b = 0.053, p < 0.001), while the indirect effect for apprentices with a bachelor's degree is not significant.

Discussion
As most research examining the relationship between education and life satisfaction utilizes either formal degree attainment (e.g., bachelor's) or years of schooling to measure education (Oreopoulos & Salvanes, 2011), less is known about specific skill development or-in the case of apprenticeships-the application of these skills.Using new survey data from the LaunchCode program, this study explores the connection between a unique training and apprenticeship program in STEM and the life satisfaction/optimism of its participants.In particular, our generalized propensity score weighted path model enables us to measure the mediating roles of STEM employment and earnings, as well as the moderating role of education.While we do not find an intent-to-treat effect of program participation on life satisfaction or optimism, we do see a positive treatment-on-treated effect of apprenticeship completion on life satisfaction as well as optimism.Here, life satisfaction and optimism have less to do with being accepted into the course and more to do with completing both the course and apprenticeship.Extending the literature, it is not simply the amount of education or the knowledge gained that improves life satisfaction and optimism, but rather the application of knowledge during the apprenticeship component.This aligns with one of the core concepts of STEM education-the application of skills (NTSA).Alternatively, it is important to note that apprenticeships may also allow for increased social networks that may also be related to life satisfaction and optimism (Verme, 2009).
However, we also observe a mild but significant improvement in optimism among those who completed a course and held a bachelor's degree.This suggests that the application of skills in an apprenticeship may not be vital in predicting optimism for those with higher levels of education.This may be because higher-educated participants have already had an opportunity to apply specialized skills in a workplace environment.Alternatively, it could be the case that higher educated participantspresumably with more work experience-have less of a need for an apprenticeship to reach their employment and financial goals.Therefore, our first two hypotheses (H1a and H1b) hold.
While apprenticeships might allow for certain skills to be practiced in a supportive environment, as well as for apprentices to expand their social networks-each of which may be related to life satisfaction and optimism, it is difficult to understand what is driving the relationships between apprenticeship completion and life satisfaction and optimism.Thus, we explore the mediating effects of STEM employment and income.Here, we find that the indirect effect of STEM employment and income explains 18.3 and 14.2 percent, respectively, of the total effect on life satisfaction among apprenticeship completers.This matches some of the previous research on reskilling programs in STEM (e.g., Seibel & Veilleux, 2019), which suggests that people enter these programs not only with an interest in higher earnings, but also with a high level of interest in STEM.Furthermore, STEM employment explains 25.0 percent of the total effect on the optimism of the apprenticeship completers.Here, unlike life satisfaction, optimism has even less to do with current earnings, and more to do with STEM employment.This is further supported by the negative indirect effect of STEM employment on both life satisfaction and optimism among course non-completers, who were less likely to be employed in STEM.Together, these findings highlight the importance of agency-and the pursuit of happiness-in the relationship between education and well-being.Alternatively, these findings could be explained by the perceived growth of the STEM field in general and/or the potential for increased future earnings within this field.Therefore, the H2a holds and H2b partially holds.
Last, in our moderated-mediation models, we find that educational attainment partially alters the direct and indirect relationships between program participation and life satisfaction, as well as between program participation and optimism.Unexpectedly, we find that admitted students without a college degree have a positive relationship with life satisfaction-even when they do not complete the program or the apprenticeship.This finding may suggest that program acceptance may contain personal meaning to applicants that is not dependent on completion-perhaps because this represents entrance into a form of post-secondary education for the first time.In addition, these participants might have lower initial program expectations, and thus lower feelings of loss when prematurely exiting the program.Alternatively, these individuals may not have enjoyed the program, and thus their non-completion may reflect a sense of autonomy and subsequent relief.We also find that course completers with a bachelor's degree have a positive, significant relationship with STEM employment.For those with bachelor's degrees, completing a Launch-Code course alone appears to secure STEM employment, potentially reflecting structural labor market conditions in which employers may prefer individuals with higher levels of formal education, regardless if they have completed an apprenticeship.However, this moderation effect does not result in a significant indirect effect of STEM employment on life satisfaction or optimism, suggesting that these particular labor market conditions may not translate into increased life satisfaction or optimism.
Further, we find that apprentices without a bachelor's degree have a larger, positive relationship with income-perhaps because they had more room to grow when compared to bachelor's degree holders.Moreover, those without a bachelor's degree also have a larger, positive, relationship between income and life satisfaction.Together, these moderation effects ultimately increase the life satisfaction of apprentices without a bachelor's degree.Similarly, these moderation effects increase the optimism of apprentices without a bachelor's degree.In addition to increased earnings, which may relieve sources of stress for less-educated-and possibly-less financially secure participants, the LaunchCode program could be viewed as a positional good (Salinas-Jiménez et al., 2011).In doing so, participants without bachelor's degrees may have different peer groups than more educated participants, which could cause their LaunchCode credentials and experiences to place them at a positional advantage-ultimately increasing their life satisfaction and optimism.Meanwhile, participants with bachelor's degrees may feel over-educated, which could take a toll on their life satisfaction and optimism.Here, participants with bachelor's degrees may feel like they are "catching up" rather than "getting ahead".Altogether, H3a and H3b are partially upheld.

Implications
Our empirical models provide several important implications.First, the ITT and TOT models demonstrate that apprenticeships matter.We observed significant increases in life satisfaction and optimism only among those who had participated in apprenticeship.On the other hand, those who just completed the course do not show a significant increase in life satisfaction or optimism.This implies the importance of the application of STEM knowledge and skills in addition to merely the acquisition of STEM knowledge and skills.Apprenticeships are particularly critical in rapidly shifting labor markets that are spurred by technological change, as they allow for new skills to be applied in the real-world settings.Future research should continue to explore programs like LaunchCode and particular components within them, like apprenticeships.
In addition, our mediation model explains how the LaunchCode program can improve its participants' life satisfaction and optimism through STEM employment.The two mechanisms-STEM employment and income-substantially explain the effects of the Launch-Code program on life satisfaction, whereas only STEM employment explains the effects of the program on optimism.In other words, what people are doing for a living appears to be more important in shaping individuals' outlook on the future, than how much they earn.Despite offering some of the highest salaries in the labor market, this finding suggests that stakeholders interested in filling open STEM jobs should highlight the work components of STEM employment in addition to the benefits.
Last, our moderated-mediation models demonstrate that apprenticeship opportunities are especially important for those without a bachelor's degree.While more research is needed to understand the mechanisms at play in regard to life satisfaction and optimism (e.g., the social connections made during the apprenticeship, or the feelings of self-efficacy garnered from practicing new skills in a supportive environment), it is important to provide these types of opportunities to individuals without traditional education credentials (e.g., 4-year degree diplomas).At the same time, measures taken to validate the skills of programs like LaunchCode should also be considered, as this may help improve the employment prospects for those without traditional education credentials.

Limitations
While our study offers novel contributions to the field, it is not without limitations.As noted by Jabbari et al. (2023a), while the use of MNPS weights in our TOT analyses effectively balanced the different "doses" of the treatment (i.e., no enrollment, enrollment but no completion, completion but not an apprenticeship, apprenticeship) across a range of observable characteristics, it is possible that other unobservable characteristics may still influence the selection, thus creating the potential for bias.However, given that our selection model accounts for entrance exam scores, which are key predictors of the offer of program enrollment, we believe our selection model is strong.Nevertheless, balancing exam scores and other sociodemographic characteristics in our MNPS model may not account for selection within the program (e.g., choosing to enroll in an apprenticeship or not; being offered an apprenticeship or not).Thus, future research seeking to ascertain causal impacts should consider not only randomizing these types of programs, but also randomizing elements within these programs, such as the apprenticeship component.

Conclusion
Resulting of the recent transformations of learning environments during the COVID-19 pandemic and current advancements in AI technology, there are increased opportunities to scale up STEM education.However, our findings point to the importance of apprenticeships in both life satisfaction and optimism, which can be more difficult to scale up than STEM courses alone.Nevertheless, our findings suggest that both the acquisition and application of STEM knowledge and skills are necessary to pursue happiness.Therefore, policies, programs, and practices should seek to broaden opportunities across both of these domains.Moreover, as STEM employment appeared to play a significant role in producing these effects-even more so than earnings-policymakers should consider additional strategies to connect students to STEM employment opportunities at various points across multiple STEM education pathways (e.g., through internships, apprenticeships, co-ops, etc.).
If the goal of public policy is not only to fill labor market demands, but also to provide opportunities for members of a society to be satisfied and fulfilled in the workplace, then local, state, and national policymakers and other stakeholders should consider larger investments in programs like LaunchCode.These investments will result in happier, healthier, and more productive citizens.

Fig. 2
Fig. 2 Mediation impacts of Skill-job match (STEM employment) and income on life satisfaction and optimism

Table 1
Descriptive statistics of variables in use R : Response variables; ME : Mediator; MO : Moderator; W : Weighting variable; IV : Instrumental variable * Converted into binary (with or without a BA degree)