work is licensed under a Creative Commons IGO 3.0 AttributionNonCommercial-NoDerivatives (CC-IGO BY-NC-ND 3.0 IGO) license (http://creativecommons.org/licenses/by-nc-nd/3.0/igo/ legalcode) and may be reproduced with attribution to the IDB and for any non-commercial purpose, as provided below. No derivative work is allowed.Any dispute related to the use of the works of the IDB that cannot be settled amicably shall be submitted to arbitration pursuant to the UNCITRAL rules. The use of the IDB's name for any purpose other than for attribution, and the use of IDB's logo shall be subject to a separate written license agreement between the IDB and the user and is not authorized as part of this CC-IGO license.Following a peer review process, and with previous written consent by the Inter-American Development Bank (IDB), a revised version of this work may also be reproduced in any academic journal, including those indexed by the American Economic Association's EconLit, provided that the IDB is credited and that the author(s) receive no income from the publication. Therefore, the restriction to receive income from such publication shall only extend to the publication's author(s). With regard to such restriction, in case of any inconsistency between the Creative Commons IGO 3.0 Attribution-NonCommercial-NoDerivatives license and these statements, the latter shall prevail.Note that link provided above includes additional terms and conditions of the license. This paper studies a model where student effort and talent interact with parental and teachers' investments, as well as with school system resources. The model is rich, yet sufficiently stylized to provide novel implications. It can show, for example, that an improvement in parental outside options will reduce parental and school effort, which are partially compensated through school resources. In this way, by incorporating the behavioral responses of parents, teachers and policymakers, the paper provides a rationale for the existing ambiguous empirical evidence on the effect of school resources. The paper also provides a novel microfoundation for peer effects, with empirical implications for welfare and different education policies.JEL classifications: I20, I21, I28, J24