can PWM and Resistance be exchanged?

I would first use a transistor to generate a PWM signal based on the output of the regulator, before filtering it and applying to Vref. This is so that you get the feed back from the output to get a good voltage regulation.