We use very large cosmological smoothed particle hydrodynamics simulations to study the properties of high-redshift Lyman α emitters (LAEs). We identify star-forming galaxies at z= 3.1 in a cosmological volume of 100 h−1 Mpc on a side. We develop a phenomenological model of absorption, scattering and escape of Lyman α photons on the assumption that the clumpiness of the interstellar medium in a galaxy is correlated with the larger scale substructure richness. The radiative transfer effect proposed by Neufeld allows a large fraction of Lyman α photons to escape from a clumpy galaxy even if it contains a substantial amount of dust. Our model reproduces, for the first time, all of the following observed properties of LAEs at z= 3.1: the angular correlation function, ultraviolet (UV) and Lyman α luminosity functions and the equivalent width distribution. A simple model that takes only dust absorption into account fails in reproducing LAEs that are also bright in UV, suggesting that the kind of effect we consider is needed. Our model predicts a bimodal age distribution for LAEs. Most of the galaxies with large Lyman α equivalent widths are young, whereas there are also old, massive and dusty LAEs, similar to recently found high-redshift LAEs. The large LAEs have escape fractions of Lyman α photons of fesc∼ 0.05–0.1.