Basically the others were causing problems most of the way and dragging Frodo into it, but then the hobbits mature over the series. Frodo is the adult in the room for the most part (he's actually like 50 years old in the book while the others are younger as they're portrayed in the movie), but his will weakens dramatically both over time and when he hits Mordor as Sam comes into his own and basically carries Frodo across the finish line. In fairness, Frodo got bit by the spider and was nearly dead from both that and starvation/thirst at the end so it's not like he was at full strength to test his willpower. Those details make his lapse a little more palatable in the book.