This dissertation focuses on the interaction of consumer and firm behavior with regulation in credit and health markets. Governments often implement a variety of regulations in these markets, which shape consumer and firm behavior in the marketplace and, ultimately, welfare. The extent to which such regulations achieve their intended goals is an empirical question. In this dissertation, I use a combination of economic models, large datasets and modern econometric techniques to inform this margin regarding three relevant policies. The first chapter, co-authored with Alberto Sepúlveda, studies the effects of interest rate caps in credit markets. Interest rate caps are widespread in consumer credit markets, yet there is limited evidence on its effects on market outcomes and welfare. Conceptually, the effects of interest rate caps are ambiguous and depend on a trade-off between consumer protection from banks' market power and reductions in credit access. We exploit a policy in Chile that lowered interest rate caps by 20 percentage points to understand its impacts. Using comprehensive individual-level administrative data, we document that the policy decreased transacted interest rates by 9%, but also reduced the number of loans by 19%. To estimate the welfare effects of this policy, we develop and estimate a model of loan applications, pricing, and repayment of loans. Consumer surplus decreases by an equivalent of 3.5% of average income, with larger losses for risky borrowers. Survey evidence suggests these welfare effects may be driven by decreased consumption smoothing and increased financial distress. Interest rate caps provide greater consumer protection in more concentrated markets, but welfare effects are negative even under a monopoly. Risk-based regulation reduces the adverse effects of interest rate caps, but does not eliminate them. The second chapter, co-authored with Juan Pablo Atal and Morten Saethre, studies quality regulation in pharmaceutical markets. Quality regulation attempts to ensure quality and to foster price competition by reducing vertical differentiation, but may also have unintended consequences through its effects on market structure. We study these effects in the context of pharmaceutical bioequivalence, which is the primary quality standard for generic drugs. Exploiting the staggered phase-in of bioequivalence requirements in Chile, we show that stronger quality regulation decreased the number of drugs in the market by 25%, increased average paid prices by 10%, decreased total sales by 20%, and did not have a significant effect on observed outcomes related to drug quality. These adverse effects were concentrated in small markets. Our results suggest that the intended effects of quality regulation on price competition through increased (perceived) quality of generics were overturned by adverse competitive effects arising from the costs of complying with the regulation. The third chapter, co-authored with Carlos Noton and Benjamin Vatter, investigates the role of vertical integration between insurers and hospitals. The welfare effects of vertical integration are ambiguous. Cost efficiencies and the elimination of double marginalization may offset increases in market power and incentives to raise rivals' costs. To study the effects of vertical integration between insurers and hospitals, we develop a model of bargaining and competition. Integrated firms have incentives to increase hospital prices to rivals to steer demand to integrated partners. We estimate the model using administrative data on claims and plans from Chile, where vertically integrated hospitals account for half of all admissions. Our estimates imply that steering incentives are significant and that vertical integration decreases welfare.