Preheat oven to 200°C (180°C fan forced). Line a 12-hole cupcake pan with patty pans/ liners.
In a medium size bowl, whisk together the self-raising flour and caster sugar.
In a small bowl mix together the egg replacer and water, whisking for 20 seconds to remove any lumps. Add milk, vinegar, melted margarine, vanilla and stir to combine.
Add wet ingredients to the dry ingredients and whisk to combine without over mixing.
Spoon cupcake mixture evenly into each patty pan. Bake in centre of oven for 20-22 minutes or until the tops springs back when lightly touched in the middle. Allow to cool in the pan for at least 5 minutes before transferring to a wire rack to cool completely.
To make the frosting: In a medium size bowl, use an electric mixer to beat the margarine until pale. Add the icing sugar in batches, beating well after each addition. Add milk and vanilla and beat until combined. If required, add a few drops extra milk to achieve a more spreadable consistency.
Tint frosting with 1-2 drops food colouring if desired. Pipe frosting onto cupcakes.