Can various fats be used as a strict substitute for pastry dough?
Apart from flavour, the two main issues you might encounter when substituting margarine for butter are:


Different fat content. There are margarines explicitly produced and marketed as low-fat options. For baking, you do not want these. As butter usually/always (depending on your location) has a fat content of 80%, you want to substitute an ingredient with a similar makeup.
Different kinds of fat. Margarine is made with vegetable oils, which contain less saturated fats than butter does. As a rule, saturated fats are more solid than unsaturated fats at the same temperature, which might lead to more 'melting' when substituting margarine for butter. However, margarine contains stabilisers making it more or less behave like butter; it is hard to predict how these will behave when baking, though.


You will probably be fine substituting full-fat margarine for butter, but if you want to err on the side of caution, my advice would be to look for a recipe that uses margarine.