In general, shortening can be substituted on an equal-weight basis for oil in a dough recipe. Margarine, like butter, contains some water, and usually one might want to adjust the formula hydration to compensate for the water content of the margarine or butter. Even then, some tweaking of the hydration may be needed, just as Don mentioned.
Peter