Whenever Randy Adderson has a conversation with Ponyboy about the upcoming trial, Ponyboy mentions that he was the one who killed Bob Sheldon. Ponyboy believes that Johnny was innocent and takes the blame for murdering the Soc member. The reason Ponyboy insists that he was the one who stabbed Bob Sheldon is because he is both in a state of denial and is suffering from posttraumatic stress disorder. Ponyboy has just witnessed the deaths of his two close friends which is extremely traumatizing. He is not thinking clearly and desperately wants to repress the memories of the tragic events. Ponyboy is also in a state of denial and does not want to accept Johnny's death. He is essentially tricking himself as a coping mechanism. Ponyboy eventually comes to terms with the tragic death of Johnny and accepts the reality of the rough situation.
Ponyboy is in a state of denial when he says that, hoping that by not admitting the truth he would not have to feel the pain of what had happened. The trauma of the past week's events, beginning with Bob's stabbing and ending with both Johnny and Dally dying, has left Ponyboy exhausted and ill, both physically and emotionally. Darry explains to Randy, "Don't ever say anything to him about Johnny...he's still pretty racked up mentally and emotionally. The Doc said he'd get over it if we gave him time" (Chapter 11). After awhile, Darry confronts Ponyboy, saying, "...you're going to have to cut it out. Johnny and Dallas were our buddies, too, but you don't just stop living because you lose someone...you don't quit" (Chapter 12). Ponyboy himself explains best what was going on with him in the closing pages of the book. He says, "I knew Johnny was dead. I had known it all the time, even while I was sick and pretending he wasn't. It was Johnny, not me, who had killed Bob - O knew that too. I had just thought that maybe if I played like Johnny wasn't dead it wouldn't hurt so much" (Chapter 12).