Part
VII: Multiple Regression (MR) |
| | Overview
of Dummy Codes | Constructing Dummy Codes | Types of
Codes | | One Way ANOVA | Factorial ANOVA | Unequal Cell Sizes in ANOVA | |
Dummy coding is used when
categorical variables (e.g. sex, geographic location,
ethnicity) are of interest in prediction. Dummy codes are
a series of numbers assigned to indicate group membership
in any mutually exclusive and exhaustive category.
The full range of uses of dummy coding schemes in MR
include:
|
There are five general
rules/guidelines for the construction of dummy codes:
|
Keeping these general
rules/guidelines for dummy variables in mind, a number of
different coding schemes can be utilized depending on
what type of relationship between the groups is of
interest. In general, there are four types of codes that
are of use: dummy, effect, contrast, and trends. Remember
that each participant will receive a score on each dummy
variable, with the score depending on the group to which
the individual belongs. For the examples below, the
number of groups is equal to four; therefore, groups are
denoted by A1, A2,
A3, and A4,
while the codes are labeled a1,
a2, and a3.
Thus, each individual in group A1 would receive the same coding as all other individuals in that group. Note the similarity between the individual contrast and trend codes and the general types of planned comparisons used in simpler statistical designs. The same R Squared will be obtained regardless of which of the above schemes is used. The dummy and effect codes are easy to generate; they do not, however, produce orthogonal dummy variables which requires both the sums and the sums of cross products of the weights to be zero. The contrast and trend codes, on the other hand, do (for equal group sizes) result in uncorrelated dummy variables. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Remember that the use of
nominal scale data in prediction requires the use of
dummy codes; this is because data needs to be represented
quantitatively for predictive purposes, and nominal lacks
this quality. Once the data is coded properly (for this,
use a text or a more established source), the analysis
can be interpreted in a manner similar to traditional
ANOVA. In fact, the sum of squares for the between group
effect (e.g. religion) and the sum of squares for error
are related to the proportion of variance accounted for:
Thus, the F Ratio can be calculated and considered as before. This formula is similar to the significance of R2 formula except that k represents the number of coded vectors (number of groups minus one):
|
| When MR is used in this
instance, it is called a least squares ANOVA. When
the number of subjects per cell are equal, the results
given by MR and traditional ANOVA are identical. In the
factorial design, each variable must be coded in
accordance to the requirements set above. Thus, each
variable requires a number of dummy codes. In addition, interactions now need to be considered. Since the interaction has only one degree of freedom (in the 2 x 2 ANOVA case), it can be represented with just one dummy code. The single dummy code is obtained by simply multiplying the effect codes together for each subject. In other words, the code for the interaction is the product of the appropriate codes for group membership. Once again, the proportion of variance accounted for is directly related to the observed effects:
|
| When cell size is unequal
in traditional ANOVA, orthogonality does not exist
between effects; in other words, an analysis of the
effects yields redundant information. This happens
because the main effects and the interactions all become
correlated--a problem well-suited to multiple regression.
As already noted, the technique of dummy coding allows
the use of categorical variables, and the analysis of
factorial designs is relatively easy. However, within MR there are various methods available for the elimination or correction of redundancy between main and interaction effects. This is basically the problem of selecting a variable entry strategy to estimate an "unconfounded" effect, which removes variance that can be accounted for by other effects. In all cases, the error term remains the same as before. There are three such methods:
|