I've seen a lot of rumors, but very little proof on any of it (pH, temp, etc).
I do recall a well-written article on ICMAG that argued that stresses of any kind (pH, temp, too much / too little water, nutes, etc) during the 3rd/4th week of growth was a critical factor, and that having your groove down with your plants by week 3 was a key factor in getting more females. The author was claiming something like an 80% female ratio by focusing on this idea. But again, no controlled trial info or other data you can really lock in on.
I'm surprised that no one in the whole world has cracked into the MJ genome to see how clearly the genetic predisposition is defined inside the seed.