Machine learning model to predict mental health crises from electronic health records

Publication in Nature Medicine by Roger Garriga ’17 and Javier Mas ’17 (Data Science) et al

Article cover in Nature Medicine

The use of machine learning in healthcare is still in its infancy. In this paper, we describe the project we did to predict psychotic episodes together with Birmingham’s psychiatric hospital. We hope to see these sorts of applications of ML in healthcare become the new standard in the future. The technology is ready, so it’s just a matter of getting it done!

Paper abstract

The timely identification of patients who are at risk of a mental health crisis can lead to improved outcomes and to the mitigation of burdens and costs. However, the high prevalence of mental health problems means that the manual review of complex patient records to make proactive care decisions is not feasible in practice. Therefore, we developed a machine learning model that uses electronic health records to continuously monitor patients for risk of a mental health crisis over a period of 28 days. The model achieves an area under the receiver operating characteristic curve of 0.797 and an area under the precision-recall curve of 0.159, predicting crises with a sensitivity of 58% at a specificity of 85%. A follow-up 6-month prospective study evaluated our algorithm’s use in clinical practice and observed predictions to be clinically valuable in terms of either managing caseloads or mitigating the risk of crisis in 64% of cases. To our knowledge, this study is the first to continuously predict the risk of a wide range of mental health crises and to explore the added value of such predictions in clinical practice.

(You can also read about the project in more detail in this article from UPF)


Garriga, R., Mas, J., Abraha, S. et al. Machine learning model to predict mental health crises from electronic health records. Nat Med (2022).

Connect with BSE authors

Roger Garriga ’17 is a Research Data Scientist at Koa Health. He is an alum of the BSE Master’s in Data Science.

Javier Mas ’17 is Lead Data Scientist at Kannact. He is an alum of the BSE Master’s in Data Science.

Application of bagging in day-ahead electricity price forecasting and factor augmentation

Publication in Energy Economics by Kadir Özen ’21 (PhD Track) and Dilem Yıldırım

Illustration of an energy plant and city lights with market graph

This paper has been published in the November 2021 issue of the journal Energy Economics.


The electricity price forecasting (EPF) is a challenging task not only because of the uncommon characteristics of electricity but also because of the existence of many potential predictors with changing predictive abilities over time. In such an environment, how to account for all available factors and extract as much information as possible is the key to the production of accurate forecasts. To address this long-standing issue in a way that balances complexity and forecasting accuracy while facilitating the traceability of the predictor selection procedure, we propose the method of Bootstrap Aggregation (bagging). To forecast day-ahead electricity prices in a multivariate context for six major power markets, we construct a large-scale pure price model and apply the bagging approach in comparison with the popular Least Absolute Shrinkage and Selection Operator (LASSO) estimation method. Our forecasting study reveals that bagging provides substantial forecast improvements on daily and hourly scales in almost all markets over the popular LASSO estimation method. The differentiation in the forecast performances of the two approaches appears to arise, inter alia, from their structural differences in the explanatory variables selection process. Moreover, to account for the intraday hourly dependencies of day-ahead electricity prices, all our models are augmented with latent factors, and a substantial improvement is observed only in the forecasts from models covering a relatively limited number of predictors.


  • We forecast day-ahead electricity prices for major markets with a large-scale model.
  • The method of Bootstrap Aggregation (bagging) is applied to generate forecasts.
  • Bagging appears to be very competitive and promising compared to the popular LASSO.
  • Factor augmentation is proposed to capture intraday hourly dependencies of prices.
  • Augmentation improves forecasts only for models with limited number of predictors.

Connect with BSE authors


Kadir Özen ’21 is a student in the PhD Program at UPF and BSE. He is an alum of the BSE Master’s in Economics and Finance (PhD Track).

Marta Morazzoni and Andrea Sy win EEA Young Economist Award

Their paper, “Female entrepreneurship, financial frictions and capital misallocation in the US,” has also been published in the Journal of Monetary Economics.

A photo of the two BSE alumni who wrote the award-winning paper, Marta Morazzoni and Andrea Sy, posing together at UPF Ciudatella Campus where they are both PhD candidates.
EEA Young Economist Awardees Marta Morazzoni ’18 and Andrea Sy ’18

BSE alumni Marta Morazzoni and Andrea Sy (both Economics Class of 2018) received the 2021 Young Economist Award from the European Economic Association and Unicredit Foundation for their paper, “Female entrepreneurship, financial frictions and capital misallocation in the US.”

The paper has also just been published in the Journal of Monetary Economics. (It originally appeared as a Barcelona School of Economics Working Paper.)

“New empirical evidence, highly relevant policy implications”

The EEA Young Economics award committee consisted of Philipp Kircher, Giacomo Ponzetto and Antonella Trigari. They noted that “the paper addresses an extremely important topic, offers new empirical evidence from micro-level data cleverly identifying informative moments, and builds a state-of-the-art general equilibrium model to rationalize the evidence and to provide highly relevant policy implications.”

Read the award committee’s report on the EEA website

Paper abstract

We document and quantify the effect of a gender gap in credit access on both entrepreneurship and input misallocation in the US. Female entrepreneurs are found to be more likely to face a rejection on their loan applications and to have a higher average product of capital, a sign of gender-driven capital misallocation that decreases in female-led firms’ access to finance. These results are not driven by differences in observable individual or businesses characteristics. Calibrating a heterogeneous agents model of entrepreneurship to the US economy, we show that the observed gap in credit access explains the bulk of the gender differences in capital allocation across firms. Eliminating such credit imbalance is estimated to potentially increase output by 4%, and to reduce capital misallocation by 12%.

Key findings

  • In the US, female entrepreneurs receive less business funding compared to male entrepreneurs.
  • Female-owned firms operate with lower levels of assets, resulting in gender-driven capital misallocation.
  • Female-led businesses are nonetheless relatively more profitable and have better credit risk scores.
  • Removing the gender gap in business financing is estimated to potentially increase output by 4%.

Connect with BSE authors


Marta Morazzoni ’18 is a PhD candidate at Universitat Pompeu Fabra and BSE. She is an alum of the BSE Master’s in Economics.


Andrea Sy ’18 is a PhD candidate at Universitat Pompeu Fabra and BSE. She is an alum of the BSE Master’s in Economics.

Economic gains from global cooperation in fulfilling climate pledges

Publication in Energy Policy by Sneha Thube ’16 (Economics) et al

Co2, Carbon Dioxide, Carbon, Oxygen, The Atmosphere
Image by Gerd Altmann from Pixabay

My paper “Economic gains from global cooperation in fulfilling climate pledges” (with Ruth Delzeitab and Christian H.C.A. Henning) is now available online.

Paper Abstract

Mitigation of CO2 emissions is a global public good that imposes different regional economic costs. We assess the distributional effects of cooperative versus non-cooperative CO2 markets to fulfil the Nationally Determined Contributions (NDCs), considering different CO2 permit allocation rules in cooperative markets. We employ a global computable general equilibrium model based on the GTAP-9 database and the add-on GTAP-Power database. Our results show the resulting winners and losers under different policy scenarios with different permit allocation rules. We see that in 2030, we can obtain gains as high as $106 billion from global cooperation in CO2 markets. A cooperative CO2 permit market with equal per capita allowances results in considerable monetary transfers from high per capita emission regions to low per capita emission regions. In per capita terms, these transfers are comparable to the Official Development Assistance (ODA) transfers. We also disaggregate the mitigation costs into direct and indirect shares. For the energy-exporting regions, the largest cost component is unambiguously the indirect mitigation costs.


With regard to the initial NDCs, aggregate economic gains from jointly achieving the NDCs are $106bn (i.e. 60% of costs with unilateral action) in 2030. Mobilizing cooperation via Article 6 is important.

When the costs are disaggregated into direct (i.e. domestic mitigation) and indirect (i.e. due to changes in international markets) within the energy-exporters (e.g., Russia, Canada, Middle East and North Africa) the dominant cost share arises from indirect costs.

We also model a scenario using where regional allowances allocated in proportion to the regional population (aka Carbon Egalitarianism) within a global ETS. This approach addresses global equity issues, aligns incentives of all countries & eliminates free-riding problem.

Large financial transfers (~$114bn in 2030) are generated via the carbon markets are leads to welfare improvements in the developing regions. These transfers are comparable to the per capita ODA received by some countries esp. in Sub-Saharan Africa.

The approach based on per capita emission benchmarking has also been suggested by Dr. Raghuram Rajan

If global justice is considered as a global public good, which similar to GHG mitigation, is underprovided, then the principle of carbon egalitarianism could promisingly combine an additional aspect to welfare, giving an important message for policymakers.

Connect with the author


Sneha Thube ’16 is a researcher at the Kiel Institute for World Economy. She is an alum of the Barcelona GSE Master’s in Economics.

Two Macro alumni publish in the same volume of European Economic Review

Publications by Nicolò Maffei-Faccioli ’15 and Alessandro Ruggieri ’12

The September 2021 volume of the journal European Economic Review includes two publications by alumni of the BSE Macroeconomic Policy and Financial Markets Program:

Does immigration grow the pie? Asymmetric evidence from Germany

by Nicolò Maffei-Faccioli ’15 (with Eugenia Vella)

We provide empirical evidence suggesting that net migration shocks can have substantial demand effects, potentially acting like positive Keynesian supply shocks. Using monthly administrative data (2006–2019) for Germany in a structural VAR, we show that the shocks stimulate vacancies, wages, house prices, consumption, investment, net exports, and output. Unemployment falls for natives (dominant job-creation effect), driving a decline in total unemployment, while rising for foreigners (dominant job-competition effect). The geographic origin of migrants and the education level of residents matter crucially for the transmission. Overall, the evidence implies that the policy debate should focus on redistributive strategies between natives and foreigners.

(Featured on this blog as a working paper last year)

Twin Peaks: Covid-19 and the labor market

by Alessandro Ruggieri ’12 (with Jake Bradley and Adam Hal Spencer)

This paper develops a choice-theoretic equilibrium model of the labor market in the presence of a pandemic. It includes heterogeneity in productivity, age and the ability to work from home. Worker and firm behavior changes in the presence of the virus, which itself has equilibrium consequences for the infection rate. The model is calibrated to the UK and counterfactual lockdown measures are evaluated. We find a different response in both the evolution of the virus and the labor market with different lockdown policies. A laissez-faire approach results in lives lost and acts as negative shock to the economy. A lockdown policy, absent any other intervention, will reduce the lives lost but increase the economic burden. Consistent with recent evidence, we find that the economic costs from lockdown are most felt by those earning the least. Finally, we introduce a job retention scheme as implemented by the UK Government and find that it spreads the economic hardship more equitably.

Connect with BSE authors

Nicolò and Alessandro are both alumni of the Barcelona School of Economics Master’s Program in Macroeconomic Policy and Financial Markets. They both got their PhDs from the IDEA Program (UAB and BSE).


Nicolò Maffei-Faccioli ’15 is a Senior Economist at Norges Bank.


Alessandro Ruggieri ’12 is an Assistant Professor at the University of Nottingham.

The additional costs of living with a disability in the UK

Publication in the European Journal of Health Economics by Lukas Schuelke ’21 (ITFD)

A woman in a wheelchair around Camden street market

Last year I worked on the article, “Estimating the additional costs of living with a disability in the United Kingdom between 2013 and 2016,” which was based on my undergraduate dissertation and which just got published in the European Journal of Health Economics.

My co-authors Luke Munford and Marcello Morciano are affiliated with the School of Health Sciences at the University of Manchester.


In the United Kingdom, more than 20% of the population live with a disability. Past evidence shows that being disabled is associated with functional limitations that often cause social exclusion and poverty. Therefore, it is necessary to analyse the connection between disability and poverty. This paper examines whether households with disabled members face extra costs of living to attain the same standard of living as their peers without disabled members. The modelling framework is based on the standard of living approach which estimates the extra income required to close the gap between households with and without disabled members. We apply an ordered logit regression to data from the Family Resources Survey between 2013 and 2016 to analyse the relationship between standard of living, income, and disability, conditional on other explanatory variables. We find that households with disabled members face considerable extra costs that go beyond the transfer payment of the government. The average household with disabled members saw their weekly extra costs continually increase from £293 in 2013 to £326 in 2016 [2020 prices]. Therefore, the government needs to adjust welfare policies to address the problem of extra costs faced by households with disabled members.

Connect with BSE authors


Lukas Schuelke ’21 is a Planning Analyst at Amazon in London, UK. He is an alum of the BSE Master’s in International Trade, Finance, and Development.

Wealth Inequality in the US: the Role of Heterogeneous Returns

Best paper award for Inês Xavier (Economics ’15, UPF PhD ’21)

Paper abstract

Why is wealth so concentrated in the United States? In this paper, I investigate the role of return heterogeneity as a source of wealth inequality. Using household-level data from the Survey of Consumer Finances (1989-2019), I provide new empirical evidence on returns to wealth in the United States, and find that wealthier households earn, on average, higher returns: moving from the 20th to the 99th percentile of the wealth distribution raises the average yearly return from 3.6% to 8.3%. To understand how these return differences shape the distribution of wealth, I introduce realistic return heterogeneity in a partial equilibrium model of household saving behavior. This exercise suggests that considering both earnings and return heterogeneity can fully account for the top 10% wealth share observed in the data (76%), which cannot be explained by earnings differences alone.

Connect with BSE authors


Inês Xavier ’15 (PhD, UPF and BSE) is an Economist at the U.S. Federal Reserve Board of Governors. She is an alum of the BSE Master’s in Economics.

How has public discourse on marriage equality affected change in US institutions?

Giulia Mariani ’12 (International Trade, Finance, and Development)

Gradual institutional change analyses have allowed drawing a more flexible line between stability and transformation when examining how institutions evolve over time, particularly in the absence of major critical junctures or exogenous shocks. Yet, the explanatory power of the theory has been undermined by a lack of attention to the overlapping boundaries of the modes of gradual institutional change, a relatively static model of agency, and conceptual confusion regarding what the modes of change exactly are.

In our recent article “Discursive Strategies and Sequenced Institutional Change: The Case of Marriage Equality in the United States” published in Political Studies, Tània Verge and I argue that addressing these shortcomings requires investigating the agent-based dynamics underpinning gradual institutional change and bringing to the fore the role of ideas. Indeed, ideas and discourses can have a constitutive impact in the creation, maintenance and reform of institutions, and actors strategically reframe problems and redirect solutions to influence both the process and the outcome of policy reforms.

Employing marriage equality in the United States as a case study, we show that the modes of gradual institutional change can be studied simultaneously as processes that unfold over time, often in a sequential fashion, as outcomes of these processes, and as strategies pursued by actors to steer, impede or undermine policy change.

Our results reveal that proponents and opponents of marriage equality have deployed discursive frames to legitimize institutional change to take off sequentially in a progressive direction — through the modes of “layering“ and “displacement“ — and in a regressive direction — through the mode of “conversion“.

Throughout this sequenced process, opposing actors have not only adjusted their discursive strategies to both their rivals and the targeted institutional venues, but have also shifted roles as change and status quo agents. Indeed, our study shows that the actors contesting the institutional status quo in one stage may become the actors defending it in a subsequent phase of the institutional change process, and vice versa. Thus, we argue that traditional, static conceptualizations of agency should be problematized and, rather than as resistance to gender-friendly reforms, opposition to marriage equality should be understood as a proactive mobilization to transform existing institutions.

The recent US Supreme Court decision in Fulton v. City of Philadelphia (2021) in favor of a Catholic foster care agency that refuses to work with same-sex couples, should then be understood as a victory of the years-long conservative strategy to undermine LGBT couples’ newly recognized right to marry.

Lastly, our study highlights the role of private actors as ideational entrepreneurs in the adoption and implementation of “morality policies,“ such as marriage equality. While morality policy scholars have so far predominantly examined how governmental actors shape policymaking, we show that the discursive strategies deployed by LGBT advocates, religious-conservative organizations and other private actors, such as foster care agencies, florists, and bakers, created new opportunities to influence policy debates and tip the scales to their preferred policy outcome.

Connect with the author


Giulia Mariani ’12 is a postdoctoral researcher in Political Science at Uppsala University. She is an alum of the Barcelona GSE Master’s in International Trade, Finance and Development.

How can we rethink our economy for a more sustainable future?

Nils Handler ’18 presents the D\carb Future Economy Forum

I recently founded the D\carb Future Economy Forum with the goal of better informing the public debate on climate change on topics such as green growth, green macroeconomics and green innovation.

D\carb is strongly inspired by my Master’s studies at Barcelona GSE such as Antonio Ciccone’s class on Economic Growth and Albert Bravo-Biosca’s course on innovation policy.

Last week we held our virtual kick-off event, “Green Growth: Technological Innovation, Market Incentives and Investments for a Green Economy” to discuss the opportunities and risks of transitioning our economy into a sustainable future.

Our speakers were Prof. Ottmar Edenhofer, Director and Chief Economist of the Potsdam Institute for Climate Impact Research, and Prof. Cameron Hepburn, Director of the Economics of Sustainability Programme and Professor of Environmental Economics at the University of Oxford. Johanna Schiele, McCloy-fellow at the Harvard Kennedy School, moderated the event.

The event was organized jointly with the Mercator Research Institute on Global Commons and Climate Change and the Sustainability Centre of the Hertie School of Governance.

Upcoming events and more information about these topics is available on our website:

Connect with the author

Nils Handler ’18 is a PhD Student at DIW Berlin. He is an alum of the Barcelona GSE Master’s in International Trade, Finance, and Development.

How we used Bayesian models to balance customer experience and courier earnings at Glovo

Javier Mas Adell ’17 (Data Science)

Neon sign depicts Bayes' Theorem

Glovo is a three-sided marketplace composed of couriers, customers, and partners. Balancing the interests of all sides of our platform is at the core of most strategic decisions taken at Glovo. To balance those interests optimally, we need to understand quantitatively the relationship between the main KPIs that represent the interests of each side.

I recently published an article on Glovo’s Engineering blog where I explain how we used Bayesian modeling to help us tackle the modeling problems we were facing due to the inherent heterogeneity and volatility of Glovo’s operations. The example in the article talks about balancing interests on two of the three sides of our marketplace: the customer experience and courier earnings.

The skillset I developed during the Barcelona GSE Master’s in Data Science is what’s enabled me to do work like this that requires knowledge of machine learning and other fields like Bayesian statistics and optimization.

Connect with the author


Javier Mas Adell ’17 is Lead Data Scientist at Kannact. He is an alum of the Barcelona GSE Master’s in Data Science.