Unifying estimation of varying-coefficient models