.-
help for ^intterms^                            (statalist distribution 27apr199
> 8)
.-

Generate all indicators for all intersections of two categorical variables - --------------------------------------------------------------------------

^intterms^ variable1 variable2 [^if^ exp] [^in^ range] , ^gen(^var_stub > ^)^ [^, nodrop^ ^full^ ^index^ ]

Description - -----------

^intterms^ generates a set of indicators for all intersections of two categorical variables.

Required "option" - -----------------

^gen(^var_stub^)^ designates the "variable stub" which will be used as the leading characters in the indicator variable names. Note, use only a single character if you wish to allow the maximum number of digits for use in representing the categories -- 6 digits.

Options - -------

^nodrop^ indicates that the first indicator variable *NOT* be dropped from the set of generated variables. This option creates a set of indicators that fully span the space and are collectively collinear.

^full^ indicates that indicators should be generated for all combinations of the two variables, even if the indicator is constant for a combination.

^index^ specifies that the "index" values of the categories be used in naming the indicator variable rather than the values of the variable. For example, if ^cat1^ takes on the values 1, 2, 5, 6 and "D" were specified on the ^gen()^ option; the indicator variables would normally start with D1... , D2..., D3...., D5...., D6.... . With the ^index^ option, the indicators would be named D1... , D2..., D3...., D4...., D5.... .

Examples - --------

. intterms mpg foreign, gen(D) . intterms mpg foreign, gen(ivar) index

Author - ------

Vince Wiggins StataCorp. vwiggins@@stata.com

Also see - --------

Manual: ^[U] 26 Estimation and post-estimation commands^ ^[U] 35 Overview of model estimation^ ^[R] xi^ On-line: ^[R] xi^, help for any estimation command