Professional Documents
Culture Documents
مقدمة
اقتصر الحديث فيما سبق من وحدات على تصاميم المتغيرات المستقلة أو المتنبئات فيها متغيرات متصلة
. continuousوهن اك ن وع آخ ر من المتغ يرات ه و المتغ يرات التص نيفية . categorical variableإن
المعلومات المحصلة من المتغيرات التصنيفية يمكن استخدامها للشرح أو التنبؤ .explain or predict
ويمكن استخدام المتغيرات التصنيفية في تحليل االنحدار ،بعد أن يتم ترميزها codedأوال.سيتم التعرض
إلى طريق ة ترم يز المتغ يرات التص نيفية في ه ذه الوح دة.وس يتم التط رق للتحلي ل في ح ال حج وم العين ات
متساوي وغير متساوي .وسيتم في نهاية الوحدة المقارنة بين تحليل االنحدار المتعدد وتحليل التباين.
e.g., experimental, quasi- ويمكن اس تخدام المتغ يرات التص نيفية في تص اميم بحثي ة مختلف ة(,
1
The method of coding categorical variables and the manner in which they are
used in regression analysis is the same, regardless of the type of design and
regardless of whether the aim is explanation or prediction.
الترم--يز عب ارة عن مجموع ة من الرم وز يمكن تعيينه ا بحيث تعم ل على تحوي ل ح رف،أو كلم ة،أو
عب ارة أو إش ارة إلى ش كل أو رقم أو أي تمثي ل آخ ر ،وتع يين الرم وز في عملي ة الترم يز يتب ع لقاع دة أو
مجموع ة قواع د ُتح َد د بتعري ف المتغ ير المس تخدم ،على س بيل المث ال :يمكن أن تعَّين مجموع ة الرم وز {
}A,B,Cلثالث معالجات مختلفة .أونعين مجموعة الرموز { }0,1لتشير إلى مجموعة ض ابطة وتجريبية
أو إلى ذك ور وإ ن اث .ق د تك ون القاع دة واض حة لبعض المتغ يرات وق د تتطلب القلي ل من التوض يح ،في
بعض األحي ان كم ا في تع يين الص فر والواح د لل ذكور واإلن اث ،بينم ا تتطلب بعض المتغ يرات تعريف ات
وتوضيحات موسعة للقواعد التي قد ال يكون هناك اتفاق عليها بين جميع أو معظم المهتمين ،مثل شرح
2
The number of dummy variables we must create is equal to k-1 where k is the
number of different values that the categorical variable can take on.
Example 1: Create a Dummy Variable with Only Two Values
Suppose we have the following dataset and we would like to
use gender and age to predict income:
3
We could then use Age and Gender_Dummy as predictor
variables in a regression model.
الترميز الوهمي ( ) Dummy coding
الترميز الوهمي
If a matrix has only one row or only one column it is called a vector. A
matrix having only one row is called a row vector. is a row vector
because it has only one row.
يعتبر الترميز الوهمي أبسط طريقة لترميز المتغيرات التصنيفية.يقوم الشخص هنا بتوليد عدة vectors
(vectorsأعم دة) ،بحيث يش ير الرم ز 1إلى العض وية في مجموع ة معين ة وص فر إلى ع دم العض وية في
المجموع ة في العم ود .بمع نى آخ ر القيم ال تي تعطى في الترم يز للمتغ يرات الوهمي ة ال تش ير إلى قي اس
4
حقيقي ،بل تستخدم لتمييز عضوية المجموعة .أبسط حالة يكون فيها المتغير التصنيفي يتكون من فئتين
مث ال:للبيان ات في ج دول 11.1لتجرب ة تن اولت بيان ات من عين ة مكون ة من 10أش خاص م وزعين على
5
لتوضيح تطبيق ترميز المتغيرات الوهمية في11.1سيتم اجراء تحليل االنحدار البسيط للبيانات في جدول
vector العالم ات على المتغ ير الت ابع لكال المجموع تين في عم ود11.2يع رض ج دول. ل االنح دار--تحلي
X2, subjects in E are assigned 1 's, whereas those in C are assigned O's.
X3, subjects in C are assigned 1 's and those in E are assigned O's
X2 and X3, then, are dummy vectors in which a categorical variable with two
تساعد في الشرح أو التنبؤ فيX's )) لمالحظة فيما إذا كانت قيمY on the X's يمكن اآلن ايجاد انحدار
بمع نى آخ ر الب احث يبحث فيم ا إذا ك انت المعلوم ات الم أخوذة من العض وية في مجموع ات.Y التب اين في
:في الوحدة السادسة بينت كيف نستفيد من جبر المصفوفات في حل المعادالت كاآلتي
In linear algebra, the transpose of a matrix is an operator which flips a matrix over its diagonal; that
is, it switches the row and column indices of the matrix A by producing another matrix, often denoted
by AT (among other notations).[1]
6
7
8
9
اختبار معامل االنحدار Test of the Regression Coefficient
أش-رت س-ابقا أن معام-ل االنح-دار bيس-اوي انح-راف وس-ط المجموع-ة واح-د عن وس-ط المجموع-ة ص-فر،
بمع نى bتساوي الفرق بين وسطين.نفس القيم تم الحص ول عليه ا في ( and (b) )aفي ج دول ، 11.3
) .وبه-- -ذا ) ،وفي الثاني ة س البة( م ا ع دا في األولى موجب ة أي(
اختبار الداللة لـ bمكافئ الختبار الفرق بين وسطين .وبهذا فإن قيمة) t=2.31,df=8(N-K-1هو نفسه
الح ظ أن مجم وع المربع ات متط ابق في ( and (b) of Table 11.3 )aبس بب أنهم ا يعكس ان نفس
المعلومات حول عضوية المجموعة ،بغض النظر عن الرموز المحددة لألعضاء في المجموعة.
سأقوم بعرض مثال يتضمن متغير ذو فئات متعددة ،وسأقوم بتحليل المسألة بطريقة ،ANOVAومن ثم
10
ويهد ف التحليل إلى بيان.يستخدم تحليل التباين األحادي الختبار الفروق بين متوسطات مجتمعين فأكثر
Which A I and A2 are, say, two treatments for weight reduction whereas A3 is
a placebo. Or, AI, A2, and A3 may represent three different methods of teaching
reading.
nonexperimental research.
The three groups can, of course, represent three other kinds of categories
11
The group that gets all zeros is the base group or comparison group
. لتوضيح تطبيق ترميز المتغير الوهمي ذي الفئات المتعددةTable 11.4 سأقوم اآلن باستخدام بيانات
. a single vector في عمود منفردY تم عرض عالمات المتغير التابع11.5 في جدول
1-Using dummy coding,I created two vectors, Dl and D2, in Table 11.5.
2-In Dl, I assigned 1 's to subjects in group Al and 0's to subjects not in AI.
12
A2 .
Note that I am using the letter D to stand for dummy coding and a number
Thus, assuming a design with five categories, D4 would mean the dummy vector
in which group 4 is assigned 1 's. I could create also a vector in which subjects
of group A3 would be assigned l's and those not in this group would be assigned
D's.
exhausted by the two vectors I created. A third vector will not add any
vectors is equal to the number of groups and about(X'X) therefore being singular.
Stated another way, knowing an individual's status on the first two coded
13
In general, to code a categorical variable with g categories or groups it is
necessary to create g - 1 vectors, each of which will have 1 's for the members
of a given group and 0's for those not belonging to the group.
Because only g - 1 vectors are created, it follows that members of one group will
In the present example there are three categories and therefore I created two
Instead of assigning l' s to groups A I and A2, I could have created two different
vectors (I do this in the computer analyses that follow). Thus, I could have
assigned 1 's to members of groups A2 and A3, respectively, in the two vectors.
In this case, members of group Al would be assigned O's in both vectors. In the
following I discuss considerations in the choice of the group assigned O's. Note,
however, that regardless of which groups are assigned 1 's, the number of
vectors necessary and sufficient for information about group membership in the
Nomenclature التسمية
14
Hereafter, I will refer to members of the group assigned 1 's in a given vector as
as each group (except for the one assigned O's throughout) is assigned 1 's (i.e.,
identified) in one vector only and is assigned O's in the rest of the vectors.
15
16
Y D1 D2
4 1 0
5 1 0
6 1 0
7 1 0
8 1 0
7 0 1
8 0 1
9 0 1
10 0 1
11 0 1
17
1 0 0
2 0 0
3 0 0
4 0 0
5 0 0
Model Summary
Adjusted R Std. Error of the
Model R R Square Square Estimate
1 .866a .750 .708 1.581
a. Predictors: (Constant), D2, D1
ANOVAa
Model Sum of Squares df Mean Square F Sig.
1 Regression 90.000 2 45.000 18.000 .000b
Residual 30.000 12 2.500
Total 120.000 14
a. Dependent Variable: Y
b. Predictors: (Constant), D2, D1
Coefficientsa
Standardized
Unstandardized Coefficients Coefficients
Model B Std. Error Beta t Sig.
1 (Constant) 3.000 .707 4.243 .001
D1 3.000 1.000 .500 3.000 .011
D2 6.000 1.000 1.000 6.000 .000
a. Dependent Variable: Y
18
Eta squared is a measure of effect size for analysis of variance
(ANOVA) models. It is a standardized estimate of an effect size,
meaning that it is comparable across outcome variables measured
.using different units
19
Tests of Regression Coefficients اختبار معامالت االنحدار
بينا سابقا أنه عند قسمة bعلى الخطأ المعياري لها يعطي tبدرجات حرية تساوي قيم مجموع مربعات
bD1لـ ، bD2وكل قيمة من tدرجات الحرية .12مما ، البواقي لمعادلة االنحدار األولى t=3لـ t=6
سبق عن b's in a regression equation with dummy codingفإن اختبار bمكافئ الختبار
الفرق بين وسطي المجموعة التي ينتمي لها bمع المجموعة المقارنة.
أن قيم ة tالمرتبط ة بـ b'sمتطابق ة م ع قيم ة tعن دما يتم حس اب الف رق بين مجموع ة المعالج ة
20
الح ظ أن قيم تي tمتط ابقتين م ع م ا تم الحص ول علي ه س ابقا من two b's associated with the
.dummy vectors of Table 11.5وتم تعيين قيم O'sلـ A3في كال العمودين ، vectorsوبهذا تخدم
21
إن الترميز الوهمي ليس محدودا فقط للتصاميم التي تحوي مجموعة مقارنة أو ضابطة .يمكن استخدامه
لترميز أي متغير تصنيفي.حيث حينما ال يحوي التصميم مجموعة مقارنة ،سيكون تعيين المجموعة التي
أما إذا احتوى التصميم عدة مجموعات معالجة مع واحدة ضابطة ،يتم تعيين القيم O's in all vectors
س مي ترم يز األث ر بس----بب أن مع----امالت االنح----دار المرتبط----ة م----ع vectorsالمرم----زة تعكس آث----ار
المعالجات.األعداد المس تخدمة في الترميز هي( .)s, O's, and -1 's' 1وبهذا فإن ترميز األثر شبيه
بالترميز الوهمي .الفرق يكون في أنه في الترميز الوهمي مجموعة واحدة أو فئة تعطى القيمة O's in
،all the vectorsبينم ا في ترم يز األث ر مجموع ة واح دة أو فئ ة تعطى القيم ةs in all the' 1-
س تأخذ القيم ة ،1-لكن من المالئم أن تك ون للمجموع ة األخ يرة .وكم ا في الترم يز ال وهمي يتم تولي دk ,
.(the number of groups minus one) coded vectorsويتم تعريف كل vectorبالقيم ة' 1
.sوكل األفراد يأخذوا العدد O'sما عدا أفراد المجموعة األخيرة يأخذوا القيمة.s' 1-
Table 11.6 displays effect coding for the data I analyzed earlier by dummy
coding along with a number indicating the group identified in the given vector.
Thus, in vector E1 of Table 11.6 I assigned 1 's to members of group At. O's to
22
members of group A2, and -1 's to members of group A3 . In vector E2, I
assigned O's to members of AI, 1 's to those of A2, and -1 's to those of A3• As
in the case of dummy coding, I use REGRESSION of SPSS to analyze the data
of Table 11.6
23
E2 E1 Y
0 1 4
0 1 5
0 1 6
0 1 7
0 1 8
1 0 7
1 0 8
24
1 0 9
1 0 10
1 0 11
-1 -1 1
-1 -1 2
-1 -1 3
-1 -1 4
-1 -1 5
Model Summaryb
Change Statistics
R Adjusted R Std. Error of the R Square F Sig. F
Model R Square Square Estimate Change Change df1 df2 Change
a
1 .866 .750 .708 1.581 .750 18.000 2 12 .000
a. Predictors: (Constant), E2, E1
b. Dependent Variable: Y
ANOVAa
Model Sum of Squares df Mean Square F Sig.
1 Regression 90.000 2 45.000 18.000 .000b
Residual 30.000 12 2.500
Total 120.000 14
a. Dependent Variable: Y
b. Predictors: (Constant), E2, E1
Coefficientsa
Model Unstandardized Coefficients Standardized t Sig.
Coefficients
25
B Std. Error Beta
1 )(Constant 6.000 .408 14.697 .000
E1 .000 .577 .000 .000 1.000
E2 3.000 .577 .866 5.196 .000
a. Dependent Variable: Y
ونموذج خطي يعني أن عالمة الفرد تكون تركيب خطي لعدد من العناصر.في معادلة( )11.8تكونت من
ثالثة أجزاء() grand mean, a treatment effect, and an error
وبإعادة صياغة للمعادلة( )11.8فإن الخطأ جزء من Y ijغير مفسر من grand meanو a treatment
effect
26
27
28
29
المقارنات المتعددة بين األوساط MULTIPLE COMPARISONS AMONG MEANS
إذا كانت قيمة Fدالة لـ ،R2هذا يقود لرفض الفرضية الصفرية (ال يوجد عالقة بين عض وية المجموع ة أو
المعالجات واألداء على المتغير التابع.
30
بالنسبة للمتغير التصنيفي الداللة اإلحصائية لـ R2 μ1=μ2=μ3=…..μg(g = number of groups or
) categoriesتعني رفض الفرضية.
رفض الفرضية الصفرية ال يعني أن جميع األوساط مختلفة عن بعضها.لتحدي د موض ع االختالف نحت اج إلى
إجراء مقارنات متعددة.
إن موضوع المقارن ات المتع ددة موض وع معق د وج دلي(.هن اك مناقش ات لب احثين تع رض لهم لمن يري د
التوسع في الكتاب)
هناك نوعين من المقارنات المتعددة :المخطط لها ,Planned, or a prioriوالبعدية ,Post hoc
31
س وف أقتص ر في الش رح على طريق ة ش افيه لص الحيتها لك ل المقارن ات الممكن ة(الثنائي ة والمركب ة) ،وفي
ح ال تس اوي الحج وم بين المجموع ات أو عدم تس اويها ولكنه ا األك ثر تحفظ ا(بمع نى األق ل من بين الط رق
األخرى في إظهار فرق دال) لذلك يوصي الباحثون باستخدام طرق أخرى في المقارنات الثنائية.
32
33
34
الترميز المتعامد Orthogonal Coding
35
Model Summaryb
Change Statistics
R Adjusted R Std. Error of the R Square F Sig. F
Model R Square Square Estimate Change Change df1 df2 Change
a
1 .866 .750 .708 1.581 .750 18.000 2 12 .000
a. Predictors: (Constant), O1, O2
b. Dependent Variable: Y
ANOVAa
Model Sum of Squares df Mean Square F Sig.
1 Regression 90.000 2 45.000 18.000 .000b
Residual 30.000 12 2.500
Total 120.000 14
a. Dependent Variable: Y
b. Predictors: (Constant), O1, O2
Coefficientsa
Standardized
Unstandardized Coefficients Coefficients
Model B Std. Error Beta t Sig.
1 (Constant) 6.000 .408 14.697 .000
O2 1.500 .289 .750 5.196 .000
O1 1.500 .500 .433 3.000 .011
a. Dependent Variable: Y
36
تحليل االنحدار مع الترميز المتعامد Regression Analysis with Orthogonal Coding
سوف استخدام الترميز المتعامد لتحليل البيانات التي سبق حللتها بالترميز الوهمي.حيث أن استخدام نفس
المثال للطرق الثالثة يظهر الخاصية المميزة لكل طريقة في الترميز .يبين جدول 11.9يكرر العمود Y
vectorالذي تم عرضه في الجدولين( 11.5و .)11.6وت ذكر أن ه ذا العم ود vectorعب ارة عن العالم ات
للمتغير التابع لثالث مجموعات .A1 A2, and A3ويمثل الرم زان and 02 01المقارنتين المتعامدتين
بينهماmeanAl and meanA2 (01); the average of means A 1 and A2 with the mean of :
).A3 (02
المقارنت ان اللت ان تم اختبارهم ا س ابقا هم ا نفس المق ارنتين في ج دول.11.8الحظ في المقارنة 2في جدول
11.8معاملين اثنين كسور .وكما كان سابقا قمت بعملية تحويل للمعامالت بضربها بأقل مق ام مش ترك بينهم ا
(قاسم) ( ،)2أفرز المعامالت ،,and -2 ,1 ,1تم استخدامهم كرموز لـ 02لجدول .11.9هذا التحويل لتسهيل
الحسابات اليدوية.
37
إن نتائج تحليل االنحدار واختبار الداللة سيكون نفس الشيء ،سواء معامالت على شكل كسور أو أعداد صحيحة .
سأقوم بتحليل البيانات في جدول 11.9يدويا ) Note carefully that in the present example there is
38
ومبينا من خالل الحسابات اليدوية سهولة التحليل عندما تكون المتغيرات المستقلة غير مترابطة
(in the present example there is only one independent variable, but it is
represented by two vectors that are not correlated).
Notes
1-The simplest and most efficient method is the use of matrix operations. Recall
that a solution is sought for b = (X'X)-1X'y (see Chapter 6). With orthogonal
coding, (X'X) is a diagonal matrix; that is, all the off-diagonal elements are O.
analyze the present example by matrix operations to appreciate the ease with
which this can bedone when orthogonal coding is used. For guidance in doing
2-Later in this chapter, I show how to revise the input file I used earlier for the
analysis of the same example with dummy and effect coding to do also an
analysis with orthogonal coding. For comparative purposes, I give excerpts of the
output
39
40
ولقد تم الحصول على قيم ) F (1 and 12 dfسابقا ,18 = 2/)27 + 9( , .حيث قيمة F
ألن ، ro l,02 = 0فإن حسابات كل معامل من معامالت االنحدار كما هو في تحليل االنحدار البسيط
41
42
إن فحص اختبار bيؤكد ما قلته سابقا :إن ضرب أو قسمة ال vectorالمرمز coded vectorبعدد ثابت
يؤثر على مقدار bلكن ال يؤثر ال اختبار الداللة (.أثر التحويل موضح بمث ال ع ددي لمن يري د االطالع في
الكتاب ص .)384
43
:ملخص لما سبق
- When a priori orthogonal comparisons among a set of means are hypothesized, it
is necessary to generate orthogonally coded vectors, each of which reflects one of
the hypotheses. Regressing Y on the coded vectors, proportions of variance (or ss)
due to each comparison may be obtained.
-These may be tested separately for significance. But the tests of the b's provide the
same information; that is, each t ratio is a test of the comparison reflected in the
vector with which the b is associated.
-Thus, when a computer program is used for multiple regression analysis, one need
only to inspect the t ratios for the b's to note which hypotheses were supported.
44
coded vectors are necessary; this is true regardless of the coding method). Having
done this, the researcher will examine only the t ratios associated with the b's
that reflect the a priori hypotheses. In addition, post hoc comparisons among
means (e.g., Scheffe) may be pursued.
Among major reasons for having equal sample sizes, or equal n's, in
(2) distortions that may occur because of departures from certain assumptions
relevant to the use of unequal n's as they may have serious implications for valid
interpretation of results.
Unequal n's may occur by design or because of loss of subjects in the course of
randomly assign subjects in varying numbers to treatments differing in, say, cost.
45
Other reasons for designing experiments with unequal n's come readily to mind.
The use of unequal n's by design does not pose threats to the internal validity of
Subject mortality may pose very serious threats to internal validity. The degree of
Assume that an experiment was begun with equal n's but that in the course of its
implementation subjects were lost. This may have occurred for myriad reasons,
from simple and tractable ones such as errors in the recording of scores or
the malfunctioning of equipment, to very complex and intractable ones that may
internal validity are not diminished when subject attrition results in groups of equal
46
subjects in the different treatment conditions. The less one is able to discern the
reasons for subject mortality, the greater is its potential threat to the internal
design is directly related to the sampling plan and to the questions the study is
designed to answer. Thus, when the aim is to study the relation between a
purpose is to study the relation between race and income in the United States, it
is necessary that the sample include all racial groups in the same proportions as
47
disproportionate, or unequal probabilities, sampling. Disproportionate sampling of
The preceding brief review of situations that may lead to unequal n's and the
potential threats some of them pose to the validity of the results should alert you
to the hazards of not being attentive to these issues. I will now consider the
categories are composed of unequal n's. First, I present dummy and effect coding
Dummy and Effect Coding for Unequal الترميز الوهمي وترميز األثر للحجوم غير المتساوية
N's
سوف.إن الترميز الوهمي وترميز األثر للحجوم غير المتساوية يكون كما هي في حال الحجوم المتساوية
سوف أقوم،أوضح ذلك من خالل المثال الذي تم مناقشته سابقا وكانت األعداد في المجموعات متساوية
بالنسبة للترم يز ال وهمي. العالمات للمجموعات بعد الحذف11.11ي بين ج دول. بحذف عالمات المجموعات
وبالنسبة. D2 بعنوانA2 الوهمي فيvector ويكون ال،D1 بعنوانA1 الوهمي فيvectorيكون ال
48
وبعد تحليل البيانات في الجدول أعاله في SPSSكانت النتائج كاآلتي
49
Note that the properties of this equation are the same as those of the regression
equation for dummy coding with equal n's: a (CONSTANT) is equal to the mean
of the group assigned O's throughout (A3), bDl is equal to the deviation of the
mean of Al from the mean of A3 (5.0 - 3.0 = 2.0), and bD2 is equal to the deviation
of the mean of A2 from the mean of A3 (8.5 - 3.0 = 5.5).
When there is no control group and dummy coding is used for convenience, tests
of the b'snare ignored. Instead, multiple comparisons among means are done.
50
51
52
53
54
55
56
57
MULTIPLE REGRESSION VERSUS تحليل االنحدار المتعدد مقابل تحليل التباين
ANALYSIS OF VARIANCE
بينت س ابقا أن تحلي ل االنح دار و تحلي ل التب اين األح ادي عن دما يك ون المتغ ير المس تقل تص نيفي يكون ا
.متكافئين
وطري ق ع ام في التحلي ل، أن ه أك ثر ش موالANOVA مفض ال علىMR من أهم األس باب ال تي تجع ل
ويوفر معلومات، بمعنى كل المتغيرات سواء تصنيفية أو متصلة يتم عرضها في نفس االطار،المفاهيمي
للمتغيرات المستقلة التصنيفية فقطANOVA في المقابل يتحدد استخدام. عندما نريد التفسير أو التنبؤ
األنسب أو التحليل الوحيدMR فيما يأتي قائمة بالمواقف التي يكون فيها استخدام تحليل االنحدار المتعدد
:المناسب
(2) when some of the independent variables are continuous and some are
categorical, as in analysis of covariance, aptitude-treatment
interactions, or treatments by levels designs
(3) when cell frequencies in a factorial design are unequal and
disproportionate
(4) when studying trends in the data linear, quadratic, and so on
CONCLUDING REMARKS
In this chapter, I presented three methods of coding a categorical variable:
dummy, effect, and orthogonal.
1-Whatever the coding method used, results of the overall analysis are the
same. When a regression analysis is done with Y as the dependent variable and
k coded vectors (k = number of groups minus one) reflecting group membership
58
as the independent variables, the overall R 2, regression sum of squares, residual
sum of squares, and the F ratio are the same with any coding method.
2-Predictions based on the regression equations resulting from the different
coding methods are also identical. In each case, the predicted score is equal to
the mean of the group to which the subject belongs. The coding methods do
differ in the properties of their regression equations.
A brief summary of the major properties of each method follows.
With dummy coding, k coded vectors consisting of 1 's and O's are generated.
In each vector, in turn, subjects of one group are assigned 1 's and all others are
assigned O's. As k is equal to the number of groups minus one, it follows that
members of one of the groups are assigned O's in all the vectors. This group is
treated as a control group in the analysis. In the regression equation, the
intercept, a, is equal to the mean of the control group. Each regression
coefficient, b, is equal to the deviation of the mean of the group identified in the
vector with which it is associated from the mean of the control group. Hence, the
test of significance of a given b is a test of significance between the mean of the
group associated with the b and the mean of the control group. Although dummy
coding is particularly useful when the design consists of several experimental
groups and a control group, it may also be used in situations in which no
particular group serves as a control for all others. The properties of dummy
coding are the same for equal or unequal sample sizes.
Effect coding is similar to dummy coding, except that in dummy coding one
group is assigned O's in all the coded vectors, whereas in effect coding one
group is assigned -1 's in all the vectors. As a result, the regression equation
reflects the linear model. That is, the intercept, a, is equal to the grand mean of
the dependent variable, Y, and each b is equal to the treatment effect for the
group with which it is associated, or the deviation of the mean of the group from
59
the grand mean. When effect coding is used with unequal sample sizes, the
intercept of the regression equation is equal to the unweighted mean of the group
means. Each b is equal to the deviation of the mean of the group with which it is
associated from the unweighted mean.
Orthogonal coding consists of k coded vectors of orthogonal coefficients. I
discussed and illustrated the selection of orthogonal coefficients for equal and
unequal sample sizes. In the regression equation, a is equal to the grand mean,
Y, for equal and unequal sample sizes. Each b reflects the specific comparison
with which it is related. Testing a given b for significance is tantamount
to testing the specific hypothesis that the comparison reflects.
The choice of a coding method depends on one's purpose and interest. When
one wishes to compare several treatment groups with a control group,
dummy coding is the preferred method.
Orthogonal coding is most efficient when one's sole interest is in
orthogonal comparisons among means. As I showed, however, the different
types of multiple comparisons-orthogonal, planned nonorthogonal, and post hoc-
can be easily done by testing the differences among regression coefficients
obtained from effect coding.
Consequently, effect coding is generally the preferred method of coding
categorical variables.
انتهت المحاضرة
60