Command Reference : Special Expression Reference
  
 
@wexpand
String list containing automatic dummy variable expressions.
Return the string list associated with automatically created dummy variables from numeric or alpha series.
Syntax
@wexpand(ser1[, ser2, ser3, ...][, “sample string”]))
returns the string corresponding to the set of dummy variables that span the unique values of the input series ser1, ser2, etc. These may be numerical series with integer only values, alpha series or links.
Example
For example, consider the following two variables:
SEX is a numeric series which takes the values 1 and 0.
REGION is an alpha series which takes the values “North”, “South”, “East”, and “West”.
The command:
string slist = @wexpand(sex)
yields the string SEXLIST containing “SEX=0 SEX=1”.
The @wexpand statement in,
series sregion = @wexpand(sex, region)
yields a space delimited string list SREGION with elements:
“SEX=0 AND REGION=""North""”
“SEX=0 AND REGION=""South""”
“SEX=0 AND REGION=""East""”
“SEX=0 AND REGION=""West""”
“SEX=1 AND REGION=""North""”
“SEX=1 AND REGION=""South""”
“SEX=1 AND REGION=""East""”
“SEX=1 AND REGION=""West""”
Cross-references
See “Automatic Categorical Dummy Variables” for further discussion.