This thesis consists of four chapters, all of which are related to credit risk and particularly modeling of default risk. The chapters can be read independently, and the intended audience differs somewhat among them. The first chapter is methodical; the intended audience consists of statisticians and practitioners who are end users of the software described in the chapter. In particular, the first chapter is written for biostatisticians, statisticians, or practitioners with some prior experience with survival analysis. The chapter shows fast approximate methods to estimate a class hazard models implemented in an open source R package. The second chapter focuses on default risk models for a broad group of public and private firms. These models are particularly interesting for regulators and banks that wants to evaluate the risk of a corporate debt portfolio with varying exposure. The intended audience consists of academics, particularly those working within finance with default models, as well as practitioners, either on the regulatory or private side. The main question of the chapter is whether the typically observed excess clustering of defaults is due to a misspecification of the dependence between observable variables and the probability of entering into default. While we do find improvements on the firmlevel after relaxing standard assumptions, the improvements are substantially smaller than stated previously in the literature. Moreover, we find limited evidence that the more general models fit better on an aggregate scale. Thus, we show an easily implemented random effect model that involves similar relaxations, achieves comparable firm-level performance, and performs better on the aggregate scale.