  We use a sample of 149 spectroscopically confirmed UV-selected galaxies at
$z\sim 2$ to investigate the relative dust attenuation of the stellar continuum
and the nebular emission lines. For each galaxy in the sample, at least one
rest-frame optical emission line (H$\alpha$/[NII]$\lambda6583$ or
[OIII]$\lambda5007$) measurement has been taken from the litterature, and 41
galaxies have additional Spitzer/MIPS 24$\mu$m observations that are used to
infer infrared luminosities. We use a spectral energy distribution (SED)
fitting code that predicts nebular line strengths when fitting the stellar
populations of galaxies in our sample, and we perform comparisons between the
predictions of our models and the observed/derived physical quantities. We find
that on average our code is able to reproduce all the physical quantities
(e.g., UV $\beta$ slopes, infrared luminosities, emission line fluxes), but we
need to apply a higher dust correction to the nebular emission compared to the
stellar emission for the largest SFR
($\log\mathrm{(SFR/M}_\odot\mathrm{yr}^{-1})>1.87$, Salpeter IMF). We find a
correlation between SFR and the difference in nebular and stellar color
excesses, which could resolve the discrepant results regarding nebular dust
correction at $z\sim2$ from previous results.
