  Spatially resolved kinematics of nearby galaxies has shown that the ratio of
dynamical- to stellar population-based estimates of the mass of a galaxy
($M_*^{\rm JAM}/M_*$) correlates with $\sigma_e$, if $M_*$ is estimated using
the same IMF for all galaxies and the stellar M/L ratio within each galaxy is
constant. This correlation may indicate that, in fact, the IMF is more
dwarf-rich for galaxies with large $\sigma$. We use this correlation to
estimate a dynamical or IMF-corrected stellar mass, $M_*^{\rm \alpha_{JAM}}$,
from $M_{*}$ and $\sigma_e$ for a sample of $6 \times 10^5$ SDSS galaxies for
which spatially resolved kinematics is not available. We also compute the
`virial' mass estimate $k(n,R)\,R_e\,\sigma_R^2/G$, where $n$ is the Sersic
index, in the SDSS and ATLAS$^{\rm 3D}$ samples. We show that an $n$-dependent
correction must be applied to the $k(n,R)$ values provided by Prugniel & Simien
(1997). Our analysis also shows that the shape of the velocity dispersion
profile in the ATLAS$^{\rm 3D}$ sample varies weakly with $n$:
$(\sigma_R/\sigma_e) = (R/R_e)^{-\gamma(n)}$. The resulting stellar mass
functions, based on $M_*^{\rm \alpha_{JAM}}$ and the recalibrated virial mass,
are in good agreement. If the $M_*^{\rm \alpha_{JAM}}/M_* - \sigma_e$
correlation is indeed due to the IMF, and stellar M/L gradients can be ignored,
then our $\phi(M_*^{\rm \alpha_{JAM}})$ is an estimate of the stellar mass
function in which $\sigma_e$-dependent variations in the IMF across the
population have been accounted for. Using a Fundamental Plane based
observational proxy for $\sigma_e$ produces comparable results. By
demonstrating that cheaper proxies are sufficiently accurate, our analysis
should enable a more reliable census of the mass in stars for large galaxy
samples, at a fraction of the cost. Our results are provided in tabular form.
