Redshift-space distortions with the halo occupation distribution – II. Analytic model