p _gapport module to calculates seats in party-list proportional representation p _gclsort module to sort a single variable via egen p _gdistinct module providing egen function to count distinct values p _grndraw module for random number generation from the GB2, Singh-Maddala, Dagum, Fisk and Pareto distributions p _gvreldif module to compute relative difference between successive observations p _gwmean module to compute optionally weighted means p _gwtmean module containing extensions to generate to implement weighted mean p _peers module to allow egen to compute the average characteristics of peers in a given unit (school, firm, etc.) specified by by()