Gordon Korman's novel No More Dead Dogs takes place in Bedford Middle School. The novel defines no specific state for the setting of the novel. Korman is Canadian and lives in New York. That said, one can assume that the novel's setting could be Massachusetts or Virginia (given each have a town of Bedford).
That said, for some novels, the exact setting is not important. When an author wants to appeal to as many readers as possible, the actual state where the novel takes place is irrelevant. Typically, by not naming the state, readers can engage easier given specific stereotypes do not exist.
For example, if the setting of a story takes place in New York and readers are in a small farm town in the Midwest, readers may fail to engage with the characters based upon inferences made regarding "New Yorkers." By eliminating the boarders of a state, the author opens up the novel's ability to speak to more readers.