Planned Contrasts and Data Management Class 19. QUIZ 3 ON THURSDAY, DEC. 5 Covers: Two-way ANOVA through Moderated Multiple Regression.

Slides:



Advertisements
Similar presentations
One-Way BG ANOVA Andrew Ainsworth Psy 420. Topics Analysis with more than 2 levels Deviation, Computation, Regression, Unequal Samples Specific Comparisons.
Advertisements

Planned Contrast: Execution (Conceptual) 1. Must predict pattern of interaction before gathering data. Predict that Democratic women will be most opposed.
Smith/Davis (c) 2005 Prentice Hall Chapter Thirteen Inferential Tests of Significance II: Analyzing and Interpreting Experiments with More than Two Groups.
ANOVA: Analysis of Variance
More on ANOVA. Overview ANOVA as Regression Comparison Methods.
C82MST Statistical Methods 2 - Lecture 7 1 Overview of Lecture Advantages and disadvantages of within subjects designs One-way within subjects ANOVA Two-way.
Introduction to Analysis of Variance CJ 526 Statistical Analysis in Criminal Justice.
Introduction to Analysis of Variance CJ 526 Statistical Analysis in Criminal Justice.
Analysis – Regression The ANOVA through regression approach is still the same, but expanded to include all IVs and the interaction The number of orthogonal.
Factorial ANOVA 2-Way ANOVA, 3-Way ANOVA, etc.. Factorial ANOVA One-Way ANOVA = ANOVA with one IV with 1+ levels and one DV One-Way ANOVA = ANOVA with.
Lecture 9: One Way ANOVA Between Subjects
Two Groups Too Many? Try Analysis of Variance (ANOVA)
Chapter 10 - Part 1 Factorial Experiments.
One-way Between Groups Analysis of Variance
Two-Way Balanced Independent Samples ANOVA Overview of Computations.
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 10-1 Chapter 10 Analysis of Variance Statistics for Managers Using Microsoft.
Two-Way Analysis of Variance STAT E-150 Statistical Methods.
Chapter 12 Inferential Statistics Gay, Mills, and Airasian
Inferential Statistics
Example of Simple and Multiple Regression
Psy B07 Chapter 1Slide 1 ANALYSIS OF VARIANCE. Psy B07 Chapter 1Slide 2 t-test refresher  In chapter 7 we talked about analyses that could be conducted.
ANOVA Chapter 12.
1 Advances in Statistics Or, what you might find if you picked up a current issue of a Biological Journal.
Chapter 14Prepared by Samantha Gaies, M.A.1 Chapter 14: Two-Way ANOVA Let’s begin by reviewing one-way ANOVA. Try this example… Does motivation level affect.
ANCOVA Lecture 9 Andrew Ainsworth. What is ANCOVA?
Inferential Statistics: SPSS
Factorial Design Two Way ANOVAs
Chapter 11 HYPOTHESIS TESTING USING THE ONE-WAY ANALYSIS OF VARIANCE.
ANOVA (Analysis of Variance) by Aziza Munir
ANOVA II (Part 2) Class 16. Implications of Interaction 1. Main effects, alone, will not fully describe the results. 2. Each factor (or IV) must be interpreted.
Moderated Multiple Regression Class 18. Functions of Regression 1. Establishing relations between variables Do frustration and aggression co-occur? 2.
Hypothesis testing Intermediate Food Security Analysis Training Rome, July 2010.
Inferential Statistics
Chapter 10: Analyzing Experimental Data Inferential statistics are used to determine whether the independent variable had an effect on the dependent variance.
SPSS Basics and Applications Workshop: Introduction to Statistics Using SPSS.
MGS3100_04.ppt/Sep 29, 2015/Page 1 Georgia State University - Confidential MGS 3100 Business Analysis Regression Sep 29 and 30, 2015.
One-Way ANOVA Class 16. Schedule for Remainder of Semester 1. ANOVA: One way, Two way 2. Planned contrasts 3. Correlation and Regression 4. Moderated.
Educational Research Chapter 13 Inferential Statistics Gay, Mills, and Airasian 10 th Edition.
Lecture 9-1 Analysis of Variance
Smoking Data The investigation was based on examining the effectiveness of smoking cessation programs among heavy smokers who are also recovering alcoholics.
Chapter 13 Repeated-Measures and Two-Factor Analysis of Variance
ONE-WAY BETWEEN-GROUPS ANOVA Psyc 301-SPSS Spring 2014.
McGraw-Hill, Bluman, 7th ed., Chapter 12
One-Way Analysis of Variance Recapitulation Recapitulation 1. Comparing differences among three or more subsamples requires a different statistical test.
Smith/Davis (c) 2005 Prentice Hall Chapter Fifteen Inferential Tests of Significance III: Analyzing and Interpreting Experiments with Multiple Independent.
Planned Contrasts and Data Management
Handout Eight: Two-Way Between- Subjects Design with Interaction- Assumptions, & Analyses EPSE 592 Experimental Designs and Analysis in Educational Research.
Research Methods and Data Analysis in Psychology Spring 2015 Kyle Stephenson.
Introduction to ANOVA Research Designs for ANOVAs Type I Error and Multiple Hypothesis Tests The Logic of ANOVA ANOVA vocabulary, notation, and formulas.
One-Way ANOVA Class 16. HANDS ON STATS PRACTICE SPSS Demo in Computer Lab (Hill Hall Rm. 124) Tuesday, Nov. 17 5:00 to 7:30 Hill Hall, Room 124 Homework.
Outline of Today’s Discussion 1.Independent Samples ANOVA: A Conceptual Introduction 2.Introduction To Basic Ratios 3.Basic Ratios In Excel 4.Cumulative.
Statistics (cont.) Psych 231: Research Methods in Psychology.
Summary of the Statistics used in Multiple Regression.
ANOVA II (Part 2) Class 18. FINAL EXAM Rutgers Date / Time Tuesday Dec. 15, 3:00 – 6:00 Prefer: Dec. 15, 1:00 – 4:00 What works for you???
Factorial BG ANOVA Psy 420 Ainsworth. Topics in Factorial Designs Factorial? Crossing and Nesting Assumptions Analysis Traditional and Regression Approaches.
Independent Samples ANOVA. Outline of Today’s Discussion 1.Independent Samples ANOVA: A Conceptual Introduction 2.The Equal Variance Assumption 3.Cumulative.
Educational Research Inferential Statistics Chapter th Chapter 12- 8th Gay and Airasian.
Stats Methods at IC Lecture 3: Regression.
Categorical Variables in Regression
T-Tests and ANOVA I Class 15.
Factorial Experiments
Comparing several means: ANOVA (GLM 1)
ANOVA II (Part 2) Class 18.
Comparing Several Means: ANOVA
Multiple Regression Chapter 14.
Psych 231: Research Methods in Psychology
Inferential Statistics
Exercise 1 Use Transform  Compute variable to calculate weight lost by each person Calculate the overall mean weight lost Calculate the means and standard.
MGS 3100 Business Analysis Regression Feb 18, 2016
Presentation transcript:

Planned Contrasts and Data Management Class 19

QUIZ 3 ON THURSDAY, DEC. 5 Covers: Two-way ANOVA through Moderated Multiple Regression

Degrees of Freedom in 2-Way ANOVA Between Groups Factor A (Birth Order) df A = a - 12 – 1 = 1 Factor B (Gender) df B = b – 12 – 1 = 1 Interaction Effect Factor A X Factor B (Birth X Gender) df A X B = (a –1) (b – 1) (2-1) x (2-1) = 1 Error Effect Subject Variance df s/AB = ab(s – 1) df s/AB = n - ab 10 – (2 x 2) = 6 Total Effect Variance for All Factors df Total = abs – 1 df Total = n – 1 10 – 1 = 9

Conceptualizing Degrees of Freedom (df) in Factorial ANOVA Birth Order GenderYoungest Oldest Sum Males Sum Females NOTE: “Fictional sums” for demonstration.

Conceptualizing Degrees of Freedom (df) in Factorial ANOVA Factor A Factor Ba 1 a 2 a 3 Sum b 1 # # X B 1 b 2 # # X B 2 b 3 X X X X Sum A 1 A 2 X T A, B, # = free to vary; T has been computed X = determined by A,B, #s Once A, B, # are established, Xs are known

Analysis of Variance Summary Table: Two Factor (Two Way) ANOVA ASS A a - 1SS A df A MS A MS S/AB BSS B b - 1SS b df b MS B MS S/AB A X BSS A X B (a - 1)(b - 1)SS AB df A X B MS A X B MS S/AB Within (S/AB) SS S/A ab (s- 1)SS S/AB df S/AB TotalSS T abs - 1 Source of Variation Sum of Squares df Mean Square F Ratio (SS)(MS)

F Ratios for 2-Way ANOVA

Effect of Multi-Factorial Design on Significance Levels Mean Men Mean Women Sum of Sqrs. Betw'n dt Betw'n MS Betw'n Sum of Sqrs. Within df Within MS Within Fp One Way Two Way

ONEWAY ANOVA AND GENDER MAIN EFFECT SourceSum of Squares dfMean Square FSig. Gender Error SourceSum of Squares dfMean Square FSig. Gender Birth Order Interaction Error Total 9 TWO-WAY ANOVA AND GENDER MAIN EFFECT Oneway F: 3.42 =1.22Twoway F : 3.42 =

Topics Covered Today 1. Planned Contrasts 2. Analysis of Residual Variance 3. Post-hoc tests 4. Data Management a. Setting up data files b. Cleaning data

"Pop" Culture: Gun Support as a Function of Political Party and Gender

Support of Gun Control: Which Party? Which Gender? GOP Men? GOP Women? Dem Men? Dem. Women? How much do you support handgun instruction in school? We predict:

Planned Contrast: Function 1. Factorial ANOVA tests for orthogonal (perpendicular) interactions. 2. Some studies predict non-orthogonal interactions. 3. Planned contrast provides more predictive power to confirm non- orthogonal contrasts of any particular shape (“wedge”, “arrow” [like above] or other).

Planned Contrast: Execution (Conceptual) 1. Must predict pattern of interaction before gathering data. Predict that Democratic women will be most opposed to gun instruction in school, compared to Democratic men, Republican men, and Republican women.

Convert Separate Factors into Single Factor 1. Two separate factors pol.party 1) GOP 2) Democrat gender 1) Male 2) Female 2.Convert the two separate factors into a single factor genparty1) Male Republican 2) Male Democrat 3) Female Republican 4) Female Democrat

Convert Separate Factors into Single Factor SPSS Syntax (commands) genparty1 = Male Republican 2 = Male Democrat 3 = Female Republican 4 = Female Democrat

Converting Multi-factors into Single Factor for Planned Contrast Political Party MaleFemale Republican Democrat Gender Converted into single factor with four levels GENPARTY 1= Male/Republican5.00 2=Male/Democrat4.50 3=Female/Republican4.75 4=Female/Democrat2.75

Planned Contrast: Execution (Conceptual) 3. Conduct one-way ANOVA, with new single variable as predictor. 4. Assign weights to the four levels, as follows: 1) Male Republican-1 2) Male Democrat -1 3) Female Republican-1 4) Female Democrat 3 * Weights indicate which sub-groups are to be compared. * Weights must add up to zero 5. Planned contrast then limits comparison to the indicated groups, but “counts” all subjects in terms of degrees of freedom and computation of error. This provides greater predictive power. This is even true if weight for some group(s) set at zero.

Graph of Gender X Political Party and Opposition to Gun Instruction in School

Univariate Analysis of Variance [DataSet1] Orthogonal Interaction

Planned Contrast, Page 1 Note: This is ANOVA p value, NOT contrast p value

Planned Contrast, Page 2 Contrast Tests Contrast Assumes eq. var. Doesn’t assume eq. var. Contrast value Std. Error t df Sig. (2 –tailed)

“Quality Control” for Planned Contrast Issue: Planned contrast can be a very “liberal” test, confirming patterns that don’t closely fit with actual predictions. Predicted thisObtained this Result of this –1, -1, -1, + 3 planned contrast might still be significant How to assess the “quality” of a significant planned contrast?

Analysis of Residual Variance Logic of test: Did (Between groups effect – Contrast effect) leave significant amount of systematic (non-random) variance unexplained? If so, then the contrast did not do a good job. It did not explain the outcome fully. However, if “what’s left over” (i.e., between effect – contrast) is not significant, then the contrast accounts for most of the treatment. In this case, the contrast did do a good job.

Contrast Should “Absorb” Most of Between- Groups Effect ─ ═ Between Groups Variance Contrast Effect Remaining Variance

Steps in Analysis of Residual Variance Test 1.Get SPSS printout of planned contrast 2.Get t of contrast, square it to get contrast F ( t = F ) 3.Compute SS contrast (SSc): Multiply contrast F by mean sq. w/n (MSw) of oneway ANOVA. This results in SS contrast (SSc). 4.Compute SS residuals (SSr): Get SS between (SSb) from oneway, and subtract SSc. (SSb – SSc) = SS residuals (SSr) 5.Compute MS contrast (MSc): Divide SSr by df, which is (oneway df – planned contrast df). This produces the MS contrast (MSc) 6.Compute F residuals: Divide MSc by MSw. MSc/MSw = F residuals 7.Compute df for F resid: numerator df = (df oneway – df contrast; see 5, above), denominator df = df within (from oneway). 8.Check this F in F table from any stats book. If significant, contrast is not a good fit. If not significant, the contrast is a good fit.

Residuals Analysis Test 1. Get SPSS printout of planned contrast 2. F of contrast ( Fcont ) = t 2 ; t = t 2 = SScontrast (SScont): F cont X MSw = X 1.04 = SSresiduals (SSres): SSbetween (SSb) = SSb – SScont = – =.55 5a. Contrast df = df oneway – df contrast = = 3 5b. MScontrast (MScont) = SSres / contrast df =.55/3 = F residuals ( Fresid ): Divide MScont by MSw = 0.18/1.04 =.17 7.DF for Fresid = df contrast (see 5a, above), df within: (3, 12) 8. F table at (3, 12) df, for criterion p <.25; F = Obtained Fresid = 0.17 < 1.56, therefore residual is not significant, therefore contrast result is a good fit for data.

Post Hoc Tests Do female democrats differ from other groups? 1= Male/Republican5.00 2=Male/Democrat4.50 3=Female/Republican4.75 4=Female/Democrat2.75 Conduct three t tests? NO. Why not?Will capitalizes on chance. Solution: Post hoc tests of multiple comparisons. Post hoc tests consider the inflated likelihood of Type I error Kent's favorite—Tukey test of multiple comparisons, which is the most generous. NOTE: Post hoc tests can be done on any multiple set of means, not only on planned contrasts.

Conducting Post Hoc Tests 1. Recode data from multiple factors into single factor, as per planned contrast. 2. Run oneway ANOVA statistic 3. Select "posthoc tests" option. ONEWAY gunctrl BY genparty /CONTRAST= /STATISTICS DESCRIPTIVES /MISSING ANALYSIS /POSTHOC = TUKEY ALPHA(.05). Selected post- hoc test Note: Not necessary to conduct planned contrast to conduct post-hoc test

Post hoc Tests, Page 1

Post Hoc Tests, Page 2

Data Management Issues Setting up data file Checking accuracy of data Disposition of data Why obsess on these details? Murphy's Law If something can go wrong, it will go wrong, and at the worst possible time. Errars Happin!

Creating a Coding Master 1. Get survey copy 2. Assign variable names 3. Assign variable values 4. Assign missing values 5. Proof master for accuracy 6. Make spare copy, keep in file drawer

Coding Master variable names variable values Note: Var. values not needed for scales

Cleaning Data Set 1. Exercise in delay of gratification 2. Purpose: Reduce random error 3. Improve power of inferential stats.

Complete Data Set Note: Are any cases missing data?

Are any “Minimums” too low? Are any “Maximums” too high? Do N s indicate missing data? Do SDs indicate extreme outliers? Checking Descriptives

Do variables correlate in the expected manner? Checking Correlations Between Variables

Using Cross Tabs to Check for Missing or Erroneous Data Entry Case A: Expect equal cell sizes Gender OldestYoungestOnly Child Males10 20 Females TOTAL Case B: Impossible outcome Number of Siblings OldestYoungestOnly Child None 43 6 One340 More than one34 2 TOTAL10 8

Storing Data Raw Data 1. Hold raw data in secure place 2. File raw data by ID # 3. Hold raw date for at least 5 years post publication, per APA Automated Data 1. One pristine source, one working file, one syntax file 2. Back up, Back up, Back up `3. Use external hard drive as back-up for PC

File Raw Data Records By ID Number

COMMENT SYNTAX FILE GUN CONTROL STUDY SPRING 2007 COMMENT DATA MANAGEMENT IF (gender = 1 & party = 1) genparty = 1. EXECUTE. IF (gender = 1 & party = 2) genparty = 2. EXECUTE. IF (gender = 2 & party = 1) genparty = 3. EXECUTE. IF (gender = 2 & party = 2) genparty = 4. EXECUTE. COMMENT ANALYSES UNIANOVA gunctrl BY gender party /METHOD = SSTYPE(3) /INTERCEPT = INCLUDE /PRINT = DESCRIPTIVE /CRITERIA = ALPHA(.05) /DESIGN = gender party gender*party. ONEWAY gunctrl BY genparty /CONTRAST= /STATISTICS DESCRIPTIVES /MISSING ANALYSIS /POSTHOC = TUKEY ALPHA(.05). Save Syntax File!!!

Research Project Notebook Purpose : All-in-one handy summary of research project Content: 1. Administrative (timeline, list of staff, etc.) 2. Overview 3. Experiment Materials * Surveys * Consents, debriefings * Manipulations * Procedures summary/instructions 4. IRB materials * Application * Approval 5. Data * Coding forms * Syntax file * Primary outcomes