.- help for ^pattern^ (STB-32: dt3) .- Patterns of missing data ------------------------ ^pattern^ varlist [^if^ exp] [^in^ exp] ^pattern^ shows the frequency and pattern of missingness for the variables in the varlist. In the pattern, there will be one ^column^ for each variable (in the order called in the command), and the column will have either a ^.^ or an ^X^. The ^.^ means that the variable is missing and the ^X^ means it is not missing. The column headed ^COUNT^ gives the frequency of that pattern, the column headed ^PCT^ gives the percentage of total observations that have that pattern, and the column headed ^PATTERN^ gives the pattern. At the bottom the total number of observations is given. Thus, in the first example below, there are 5 observations (out of 74, or 6.76%) that are missing the last variable checked: rep78. Note that the last row of the pattern will be those observations that have no missing values (if there are any such observations). The counter on the far left counts the number of patterns found. A maximum of 55 variables is allowed (so that the pattern will show cleanly on the screen). You may use string variables, numeric variables, or a mixture of string and numeric variables. ^if^ and ^in^ can be used either to check for patterns while excluding one (or more) observation(s) that have numerous missing values or to produce patterns for different subsets of the data to compare the pattern in, e.g., the treatment and control groups, or for males and for females, etc. See the examples below. See ^help^ for @impute@ for imputing values. Also, ^help^ for @codebook@, particularly the ^mv^ option, discusses another form of examining patterns in missing values. Examples: --------- . ^use auto^ (1978 Automobile Data) . ^pattern price-rep78^ COUNT PCT PATTERN 1. 5 6.76 XX. 2. 69 93.24 XXX Total: 74 . ^pattern _all^ COUNT PCT PATTERN 1. 5 6.76 XXX.XXXXXXXX 2. 69 93.24 XXXXXXXXXXXX Total: 74 . ^pattern _all if _n>2^ COUNT PCT PATTERN 1. 5 6.94 XXX.XXXXXXXX 2. 67 93.06 XXXXXXXXXXXX Total: 72 . ^pattern _all in 2/l^ COUNT PCT PATTERN 1. 5 6.85 XXX.XXXXXXXX 2. 68 93.15 XXXXXXXXXXXX Total: 73 . ^pattern _all if foreign==0^ COUNT PCT PATTERN 1. 4 7.69 XXX.XXXXXXXX 2. 48 92.31 XXXXXXXXXXXX Total: 52 . ^pattern _all if foreign==1^ COUNT PCT PATTERN 1. 1 4.55 XXX.XXXXXXXX 2. 21 95.45 XXXXXXXXXXXX Total: 22 Author ------ Richard Goldstein Qualitas, Inc. richgold@@netcom.com