This book contributes substantively to the current state-of-the-art of macroeconomic modeling by providing a method for modeling large collections of heterogeneous agents subject to non-pairwise externality called field effects, i.e. feedback of aggregate effects on individual agents or agents using state-dependent strategies.