So, I'm not at all victim-blaming here, just speculating whether there's a correlation between having things thrown at you and wearing kit. ****ty drivers who would do this sort of thing could very easily be the sort of rednecks that think men wearing Lycra deserve to have things thrown at them.
I'm a hippy who wears flip-flops, shorts, and a t-shirt/shirtless and I've never had anything thrown at me in at more than a decade of biking. Though I'm also 6'2", solidly built, and carry a 4" fixed blade on my belt at the small of my back (clearly visible when biking). That could help. I also do most of my biking while commuting where, presumably, even a non-Mensa member who would throw something would be aware that I could easily pull up beside them at the next light.