This paper proposes a framework to identify the effects of the minimum wage on the joint distribution of sector and wage in a developing country. I show how the discontinuity of the wage distribution around the minimum wage identifies the extent of noncompliance with the minimum wage policy, and how the conditional probability of sector given wage recovers the relationship between latent sector and wages. I apply the method in the PNAD, a nationwide representative Brazilian cross-sectional dataset for the years 2001-2009. The results indicate that the size of the informal sector is increased by around 39% compared to what would prevail in the absence of the minimum wage, an effect attributable to (i) unemployment effects of the minimum wage on the formal sector and (ii) movements of workers from the formal to the informal sector as a response to the policy.