In general, sexual dimorphism can be attributed to greater intraspecific competition in one sex, either between rivals for access to mates and/or to be chosen by mates. This may stem from the other gender being constrained by providing greater parental investment, in terms of factors such as gamete production, gestation, lactation, or upbringing of young. Although there is much variation in species, generally the more physically aggressive sex is the male, particularly in mammals. In species where parental care by both sexes is required, there tends to be less of a difference. When the female can leave the male to care for the offspring, then females may be the larger and more physically aggressive. Competitiveness despite parental investment has also been observed in some species. A related factor is the rate at which males and females are able to mate again after producing offspring, and the basic principles of sexual selection are also influenced by ecological factors affecting the ways or extent to which one sex can compete for the other. The role of such factors in human evolution is controversial.