I don't have anything deeply scientific to answer this question but it comes up often and I have a few thoughts on it. Except for the very elite, and even for them, marathon running bears little resemblance to Ironman distance triathlon running. Aside from obviously being a slower pace, the mechanics of running after 112 miles of biking are not the same. It's a marathon shuffle right from the beginning and for most will likely include some walking. Ironman running will also involve more variables such as calories intake and the associated possible digestive issues that go with that. They are the same distance but for "middle of the packers" you're trying to compare a 3-4 hour event with a 10-15 hour event.
|Ironman shuffling at Arizona 2008|
I get that psychologically, if you've never done either, covering the 26.2 distance may help with confidence but I think there are more and potentially better options from a preparation perspective. A half ironman event will give your legs some preparation for how it feels to run after biking in a 5-7 hour format. A long, over-distance bike ride (like 120 miles) will also be closer in total time to your goal event, and with only the swim proceeding it in the triathlon it will give similar sensations that you'll experience during an Ironman.
The other thing to consider about a marathon race as preparation for a long-distance triathlon is that it causes quite a bit of muscle damage with the pounding inflicted especially on the road. So yes, you're covering a large distance but if you get injured, or it takes you weeks to recover, has it really been that valuable a workout if it's impacted your total training volume overall? A triathletes motivation to do a marathon can sometimes be to get a time, test themselves out at a single sport, or just have a goal to motivate them to clock some running miles and that's fine. But I would always suggest a 6-9 month buffer between a marathon and a goal triathlon race to ensure an uninterrupted build up from either injury or an unbalanced training load.