12. Coding Contrasts and F-Tests Flashcards
What are the rules for manual contrast testing?
Must be a linear combination of population means
Associated coefficients (weights) = Must sum to zero
What are the 9 different rules for assigning weights?
- Weights -1 > x < 1
- The group in one chunk are given negative chunks and others are given positive chunks
- Sum of weights must = 0
- Group not involved in comparison, weight = 0
- For a given comparison, weights assigned to groups are equal to 1 divided by the number of groups in that chunk
- Restrict yourself to running k-1 comparisons
- Each contrast can only compare two chunks of variance (estimate between)
- Once a group is singled out, it can’t enter other contrasts
- Check if contrasts are orthogonal
What are orthogonal contrasts?
When it tests independent sources of variation
What are non-orthogonal contrasts?
Tests non-independent sources of variation
Being non-orthogonal creates statistical challenges with inferences
How do you check of a pair or set of contrasts is orthogonal?
Sum the products of the weights and if they are equal to 0 then they are orthogonal
How do we contrast code in R?
Use emmeans
Get estimated means of our groups and then visualise
Use contrast function to see results and use confints to find confidence intervals
How do you interpret the results of a contrast analysis?
Estimate gives you the difference between average of group means within a chunk
If positive estimate = Positive coded contrast has a higher man
What are the key features of experiment?
Manipulate IV - Changing predictor = Results in change in DV
Conditions are part of experimental and what is manipulated
What are factors in factorial design?
Resultant variables in data set that code experimental conditions
The data that represents he aspects of design
Factors have levels = Number of ways to vary or manipulate condition
What is the difference in linear model outcome and experiment outcome?
Linear Model Outcome = Model + Error
Experimental Outcome = Design + Error
What is one-way design?
Only one condition is manipulated
e.g. y = b0 + (b1E1 + b2E2) + Ei
Only includes treatment
How do you test main effects and contrast tests in one way design?
Main effect test - Overall F- Test
Contrast - Between groups
What are the hypothesis tested in factorial design?
Main effects and contrasts
Categorical and Categorical interactions
Simple Contrasts
What is a two-way design?
When multiple conditions are manipulated
E.g. Includes hospital, treatment and interaction
How do you test main effects in the two-way design?
Need different models to make model comparison
E.g. model comparisons using anova