  The luminosity functions of galaxies and quasars provide invaluable
information about galaxy and quasar formation. Estimating the luminosity
function from magnitude limited samples is relatively straightforward, provided
that the distances to the objects in the sample are known accurately;
techniques for doing this have been available for about thirty years. However,
distances are usually known accurately for only a small subset of the sample.
This is true of the objects in the Sloan Digital Sky Survey, and will be
increasingly true of the next generation of deep multi-color photometric
surveys. Estimating the luminosity function when distances are only known
approximately (e.g., photometric redshifts are available, but spectroscopic
redshifts are not) is more difficult. I describe two algorithms which can
handle this complication: one is a generalization of the V_max algorithm, and
the other is a maximum likelihood approach. Because these methods account for
uncertainties in the distance estimate, they impact a broader range of studies.
For example, they are useful for studying the abundances of galaxies which are
sufficiently nearby that the contribution of peculiar velocity to the
spectroscopic redshift is not negligible, so only a noisy estimate of the true
distance is available. In this respect, peculiar velocities and photometric
redshift errors have similar effects. The methods developed here are also
useful for estimating the stellar luminosity function in samples where accurate
parallax distances are not available.
