In her story "The Yellow Wallpaper," Charlotte Perkins Gilman talks about the effect of the "rest cure." This popular strategy to dealing with "emotional problems" in women drives her character insane.
This was a real treatment that S. Weir Mitchell recommended. The most likely reason why Gilman did not refer to the doctor by name was because he enjoyed a great deal of popularity and prestige. Gilman might have believed that people were not going to be willing to listen to her if she went against the recommendations of a well-known doctor.
The issue of fact does not affect my judgement of her piece. In her piece, Gilman is explaining how she felt when she had to undergo this treatment. Even if the treatment was suitable to others, I believe it is important to value her own personal experience and testimony.