Equity order flow is persistent in the sense that buy orders tend to be followed by buy orders and sell orders tend to be followed by sell orders. For equity order flow this persistence is extremely long-ranged, with positive correlations spanning thousands of orders, over time intervals of up to several days. Such persistence in supply and demand is economically important because it influences the market impact as a function of both time and size and because it indicates that the market is in a sense out of equilibrium. Persistence can be caused by two types of behavior: (1) Order splitting, in which a single investor repeatedly places an order of the same sign, or (2) herding, in which different investors place orders of the same sign. We develop a method to decompose the autocorrelation function into splitting and herding components and apply this to order flow data from the London Stock Exchange containing exchange membership identifiers. Members typically act as brokers for other investors, so that it is not clear whether patterns we observe in brokerage data also reflect patterns in the behavior of single investors. To address this problem we develop models for the distortion caused by brokerage and demonstrate that persistence in order flow is overwhelmingly due to order splitting by single investors. At longer time scales we observe that different investors’ behavior is anti-correlated. We show that this is due to differences in the response to price-changing vs. non-price-changing market orders.