Microscopic statistical theory of precompound and compound nucleus reactions