Module to generate group of individuals based on a ordinal variable
gengroup varlist [if exp] [in range] [, newvariable(newvarname) replace minsize(#) details]
Description
gengroup creates groups of individuals by using the values of an ordinal variable. The module creates groups by recoding several adjacent values of the ordinal variable, until obtaining groups with more than individuals than the number defined in the minsize option.
Options
newvariable defines the name of the new variable (group by default).
replace replaces the variable defined in the newvariable option if it already exists.
minsize defines the minimal number of individuals in each group (30 by default).
details diplays the composition of each group.
Examples
. gengroup item*
. gengroup itemA1-itemA7, newvariable(grouptocreate) replace minsize(80)
. gengroup itemA*, details
Author
Jean-Benoit Hardouin, PhD, assistant professor Team of Biostatistics, Clinical Research and Subjective Measures in Health Sciences University of Nantes - Faculty of Pharmaceutical Sciences 1, rue Gaston Veil - BP 53508 44035 Nantes Cedex 1 - FRANCE Email: jean-benoit.hardouin@univ-nantes.fr Websites AnaQol and FreeIRT
Also see
Online: help for egen, generate and genscore if installed.