SlideShare a Scribd company logo
1 of 5
Download to read offline
LINEAR CONTRASTS OR COMPARISONS

In planning an experiment, we can often provide for F tests to answer pertinent questions.

This involves partitioning the df and TRT SS.

Skillfully selected treatments can answer as many independent questions as there are TRT df.

When comparisons are independent, they are said to be orthogonal.

Advantages of Linear Contrasts

1.     They enable one to answer specific, important questions about treatment effects.

2.     The computations are simple.

3.     They provide a useful check on the TRT SS.

Orthogonal Coefficients

Linear contrasts involve the selection of orthogonal coefficients.

Comparisons for coefficients are constructed using the following rules.

1.     If two groups of equal size are to be compared, assign coefficients of +1 to the members
       of one group and -1 to those of the other group. It does not matter which group is
       assigned the positive coefficient.

2.     In comparing groups containing different numbers of treatments, assign to the first group,
       coefficients equal to the number of treatments in the second group, and to the second
       group, coefficients of the opposite sign equal to the number of treatments in the first
       group.

3.     Reduce coefficients to the smallest possible integers. For example, in comparing a group
       of two treatments with a group of four, by rule 2, the coefficients are +4,+4,-2,-2,-2.
       These can be reduced to +2,+2,-1,-1,-1,-1.

4.     Interaction coefficients can always be found by multiplying the corresponding
       coefficients of the main effects.




                                                 1
For comparisons to be orthogonal (i.e., independent), the following must be true:

1.    The sum of the coefficients must equal zero (i.e., Eci=0.)
2.    The sum of the product of the corresponding coefficients of any two comparisons is zero
      (i.e., Ecici'=0).
An Example to show how to construct a table of orthogonal coefficients.

Suppose an experiment is planned to test the efficiency of phosphorus fertilization by three
methods: broadcast (B), shallow band placement (S), and deep placement (D). Also, for each
one of these methods of placement, two rates of phosphorus will be applied (P1, and P2). A
nonfertilized treatment will be included (NT) to establish a response of the fertilizer.

Step 1. List the treatments across the top of the table.
Step 2. Write in the comparison coefficients as you decide what comparisons will be made.
                There will be t-1 comparisons.

 Comparison                       NT       P1B       P1S    P1D    P2B     P2S      P2D
 Response to P                    6        -1        -1     -1     -1      -1       -1
 P1 vs P2                         0        1         1      1      -1      -1       -1
 B vs S+D                         0        2         -1     -1     2       -1       -1
 S vs D                           0        0         1      -1     0       1        -1
 (P1 vs P2)x(B vs S+D)            0        2         -1     -1     -2      1        1
 (P1 vs P2)x(S vs D)              0        0         1      -1     0       -1       1

Description of Comparisons

1.     Is there a response to P. (NOTE: Having made a comparison involving a single trt
       compared with all the rest, NT cannot be used again if the comparisons are to be
       orthogonal.)

2.     Is the average response to P2 greater than that of P1?.

3.     Over both levels of P, is band placement superior to broadcast?

4.     Considering band placement only, is there a difference between shallow and deep?

5.     Is the change in yield from P1 to P2 different for broadcast compared to band placement?

6.     Is the change in yield from P1 to P2 different for shallow compared to deep band
       placement.



                                                 2
In the above table, note that coefficients of all rows sum to zero and that the sum of the
coefficients for the same treatments for any two comparisons sum to zero.

For each single degree of freedom contrast, a sum of square, mean square, and an F-test
can be calculated.

                SS = (EcYi.)2/(rEci2) = Q2/rk

       where:            c = coefficients
                         Yi. = Treatment totals
                         r = number of replicates
                         Q = (EcYi.)2
                         k = Eci2

Numerical Example

A study is conducted to investigate the effect of a protein supplement on male and female lamb
weight gain. There are four treatments:

       P0S0     No protein supplement, male lamb
       P0S1     No protein supplement, female lamb
       P1S0     Protein supplement, male lamb
       P1S1     Protein supplement, female lamb

We can ask three pertinent questions.
1.    Considering all lambs, does the protein supplement affect weight gain ability?
2.    Irrespective of protein supplement, are there differences in gaining ability between male
      and females?
3.    Does the protein supplement have the same affect on weight gain ability in male and
      female lambs?

 Replicate        P0S0              P0S1                P1S0        P1S1             Y.j
 1                54                51                  68          57               230
 2                57                50                  65          61               233
 3                58                53                  62          59               232
 4                59                58                  57          59               233
 Yi.              228               212                 252         236              928




                                                    3
Step 1. Calculate correction factor

               CF = (EYij)2/rt = 9282/4x4 = 53,824

Step 2. Calculate Total SS

               Total SS = EYij2 - CF = 334

Step 3. Calculate Replicate SS

               Rep SS = Y.j2/t - CF = 1.5

Step 4. Calculate Treatment SS

               Trt SS = Yi.2/r - CF = 208.0

Step 5. Calculate Error SS

               Error SS = Total SS - Rep SS - Trt SS = 124.5

Step 6. Partition Treatment SS into single df contrasts

                                                                     P0S0   P0S1    P1S0   P1S1
 Trt Totals                                                          228    212     252    236
 Protein supplement vs. No protein supplement                        +1     +1      -1     -1
 Male lambs vs. Female lambs                                         +1     -1      +1     -1
 Protein supplement x Sex of lambs                                   +1     -1      -1     +1

i.             Write coefficients
ii.            Calculate SS for each single df Comparison

               SS Protein = (EcYi.)2/(rEci2) = Q2/rk
                                         [(1)228 + (1)212 + (-1)252 + (-1)236]2    = 144
                                      4[(1)2 + (1)2 + (-1)2 + (-1)2]

               SS Sex =                  [(1)228 + (-1)212 + (1)252 + (-1)236]2    = 64
                                      4[(1)2 + (-1)2 + (1)2 + (-1)2]

               SS Protein x sex [(1)228 + (-1)212 + (-1)252 + (1)236]2 = 0
                                    4[(1)2 + (-1)2 + (1)2 + (-1)2]



                                                 4
Step 7. Write ANOVA
   Sources of variation        df                    SS                       MS              F
 Rep                      3                    1.5                      0.5                0.04
 Trt                      3               208.0                       69.33                5.0*
         Protein                    1                         144.0                144.0          10.4*
         Sex                        1                          64.0                 64.0           4.6
         Protein x Sex              1                           0.0                  0.0           0.0
 Error                    9               124.5                       13.83
 Total                    15              334.0



Conclusions


1)                             n        Mean
No protein supplement          8        55.0
Protein supplement             8        61.0

Considering all lambs, addition of a protein supplement significantly increased weight gaining
ability.

2)                                      n            Mean
Male                                    8            60.0
Female                         8        56.0

Considering both diets together, there was no significant difference in weight gaining ability
between males and females.

                               n        Mean
Male, no supplement            4        57.0
Female, no supplement          4        53.0
Male, supplement               4        63.0
Female, supplement             4        59.0

Male and female lambs responded similarly in weight gaining ability to the addition of a protein
supplement to their diet.




                                                          5

More Related Content

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Lncntrst

  • 1. LINEAR CONTRASTS OR COMPARISONS In planning an experiment, we can often provide for F tests to answer pertinent questions. This involves partitioning the df and TRT SS. Skillfully selected treatments can answer as many independent questions as there are TRT df. When comparisons are independent, they are said to be orthogonal. Advantages of Linear Contrasts 1. They enable one to answer specific, important questions about treatment effects. 2. The computations are simple. 3. They provide a useful check on the TRT SS. Orthogonal Coefficients Linear contrasts involve the selection of orthogonal coefficients. Comparisons for coefficients are constructed using the following rules. 1. If two groups of equal size are to be compared, assign coefficients of +1 to the members of one group and -1 to those of the other group. It does not matter which group is assigned the positive coefficient. 2. In comparing groups containing different numbers of treatments, assign to the first group, coefficients equal to the number of treatments in the second group, and to the second group, coefficients of the opposite sign equal to the number of treatments in the first group. 3. Reduce coefficients to the smallest possible integers. For example, in comparing a group of two treatments with a group of four, by rule 2, the coefficients are +4,+4,-2,-2,-2. These can be reduced to +2,+2,-1,-1,-1,-1. 4. Interaction coefficients can always be found by multiplying the corresponding coefficients of the main effects. 1
  • 2. For comparisons to be orthogonal (i.e., independent), the following must be true: 1. The sum of the coefficients must equal zero (i.e., Eci=0.) 2. The sum of the product of the corresponding coefficients of any two comparisons is zero (i.e., Ecici'=0). An Example to show how to construct a table of orthogonal coefficients. Suppose an experiment is planned to test the efficiency of phosphorus fertilization by three methods: broadcast (B), shallow band placement (S), and deep placement (D). Also, for each one of these methods of placement, two rates of phosphorus will be applied (P1, and P2). A nonfertilized treatment will be included (NT) to establish a response of the fertilizer. Step 1. List the treatments across the top of the table. Step 2. Write in the comparison coefficients as you decide what comparisons will be made. There will be t-1 comparisons. Comparison NT P1B P1S P1D P2B P2S P2D Response to P 6 -1 -1 -1 -1 -1 -1 P1 vs P2 0 1 1 1 -1 -1 -1 B vs S+D 0 2 -1 -1 2 -1 -1 S vs D 0 0 1 -1 0 1 -1 (P1 vs P2)x(B vs S+D) 0 2 -1 -1 -2 1 1 (P1 vs P2)x(S vs D) 0 0 1 -1 0 -1 1 Description of Comparisons 1. Is there a response to P. (NOTE: Having made a comparison involving a single trt compared with all the rest, NT cannot be used again if the comparisons are to be orthogonal.) 2. Is the average response to P2 greater than that of P1?. 3. Over both levels of P, is band placement superior to broadcast? 4. Considering band placement only, is there a difference between shallow and deep? 5. Is the change in yield from P1 to P2 different for broadcast compared to band placement? 6. Is the change in yield from P1 to P2 different for shallow compared to deep band placement. 2
  • 3. In the above table, note that coefficients of all rows sum to zero and that the sum of the coefficients for the same treatments for any two comparisons sum to zero. For each single degree of freedom contrast, a sum of square, mean square, and an F-test can be calculated. SS = (EcYi.)2/(rEci2) = Q2/rk where: c = coefficients Yi. = Treatment totals r = number of replicates Q = (EcYi.)2 k = Eci2 Numerical Example A study is conducted to investigate the effect of a protein supplement on male and female lamb weight gain. There are four treatments: P0S0 No protein supplement, male lamb P0S1 No protein supplement, female lamb P1S0 Protein supplement, male lamb P1S1 Protein supplement, female lamb We can ask three pertinent questions. 1. Considering all lambs, does the protein supplement affect weight gain ability? 2. Irrespective of protein supplement, are there differences in gaining ability between male and females? 3. Does the protein supplement have the same affect on weight gain ability in male and female lambs? Replicate P0S0 P0S1 P1S0 P1S1 Y.j 1 54 51 68 57 230 2 57 50 65 61 233 3 58 53 62 59 232 4 59 58 57 59 233 Yi. 228 212 252 236 928 3
  • 4. Step 1. Calculate correction factor CF = (EYij)2/rt = 9282/4x4 = 53,824 Step 2. Calculate Total SS Total SS = EYij2 - CF = 334 Step 3. Calculate Replicate SS Rep SS = Y.j2/t - CF = 1.5 Step 4. Calculate Treatment SS Trt SS = Yi.2/r - CF = 208.0 Step 5. Calculate Error SS Error SS = Total SS - Rep SS - Trt SS = 124.5 Step 6. Partition Treatment SS into single df contrasts P0S0 P0S1 P1S0 P1S1 Trt Totals 228 212 252 236 Protein supplement vs. No protein supplement +1 +1 -1 -1 Male lambs vs. Female lambs +1 -1 +1 -1 Protein supplement x Sex of lambs +1 -1 -1 +1 i. Write coefficients ii. Calculate SS for each single df Comparison SS Protein = (EcYi.)2/(rEci2) = Q2/rk [(1)228 + (1)212 + (-1)252 + (-1)236]2 = 144 4[(1)2 + (1)2 + (-1)2 + (-1)2] SS Sex = [(1)228 + (-1)212 + (1)252 + (-1)236]2 = 64 4[(1)2 + (-1)2 + (1)2 + (-1)2] SS Protein x sex [(1)228 + (-1)212 + (-1)252 + (1)236]2 = 0 4[(1)2 + (-1)2 + (1)2 + (-1)2] 4
  • 5. Step 7. Write ANOVA Sources of variation df SS MS F Rep 3 1.5 0.5 0.04 Trt 3 208.0 69.33 5.0* Protein 1 144.0 144.0 10.4* Sex 1 64.0 64.0 4.6 Protein x Sex 1 0.0 0.0 0.0 Error 9 124.5 13.83 Total 15 334.0 Conclusions 1) n Mean No protein supplement 8 55.0 Protein supplement 8 61.0 Considering all lambs, addition of a protein supplement significantly increased weight gaining ability. 2) n Mean Male 8 60.0 Female 8 56.0 Considering both diets together, there was no significant difference in weight gaining ability between males and females. n Mean Male, no supplement 4 57.0 Female, no supplement 4 53.0 Male, supplement 4 63.0 Female, supplement 4 59.0 Male and female lambs responded similarly in weight gaining ability to the addition of a protein supplement to their diet. 5