80 likes | 99 Views
Learn how to apply ANOVA, regression models, and dummy variables for statistical analysis. Interpret regression output with dummy variables for race, sex, and categorical predictors. Understand the differences between one-way ANOVA, regression with dummy variables, two-way ANOVA, and GLM in research. Improve your data analysis skills with comprehensive examples.
E N D
One-Way ANOVA (Figure 1) • Used when model has a quantitative response variable (DV) and a categorical explanatory variable (IV) • Actually special type of multiple regression. • Need a post hoc test for more information (to tell you which groups different) • Most common are the Tukey b test (displays group means) or the Bonferroni or the Tukey multiple comparison methods (confidence intervals)
Regression with Dummy Variable (Figure 2) • Can get same result with regression model if create a dummy variable • But M.R. provides more information • Advantage is that regression calculates slopes to use for prediction as well as standardized coefficients, plots, etc. • With binary categorical variable can create dummy coded 1 and 0 • But if categorical variable has 2+ categories, need to create K-1 dummies
Creating Dummy Variables for Race (1 White, 2 Black, 3 Other) • Use Recode into Different Variable • Code Dummy1 as White = 1, Else = 0 • Code Dummy2 as Black = 1, Else = 0 • Don’t need a dummy variable for last group • Dummy Coding: Race Dummy1 Dummy2 White 1 0 Black 0 1 Other 0 0
Interpretation of Dummy Variable • E(Y) = a + b1(Dummy1) + b2(Dummy2) • For White: Dummy1 = 1, Dummy2 = 0 • For Black: Dummy1 = 0, Dummy2 = 1 • For Other: Dummy1 = 0, Dummy2 = 0 (Agresti and Finlay (the optional reading) gives a good explanation of this in Ch. 12 Table 12.5)
Regression Using 2 Dummies (Race and Sex) Figure 3 • Dummysex coded Male=1 and Female=0 • E(Y) = a + b1(Dummy1) + b2(Dummy2)+ b3(Dummysex) • White Male: Dummy1 = 1, Dummy2 = 0, Dummysex = 1 • Black Male: Dummy1 = 0, Dummy2 = 1, Dummysex = 1 • Other Male: Dummy1 = 0, Dummy2 = 0, Dummysex = 1 • White Female: Dummy1 = 1, Dummy2 = 0, Dummysex = 0 • Black Female: Dummy1 = 0, Dummy2 = 1, Dummysex = 0 • Other Female: Dummy1 = 0, Dummy2 = 0, Dummysex = 0
Two Way ANOVAFigure 4 • Two way ANOVA, using GLM, handles 2 or more categorical predictors at the same time • Recoding as dummies not needed • Compares means of response variable (DV) for all combinations of 2+ categorical IV’s • Can test main effects as well as interaction effects simultaneously
Univariate GLM compared to Multiple Linear Regression Figure 5 • GLM can be used for linear regression using both categorical and quantitative predictors. • Categorical IV’s entered as fixed factors and quantitative IV’s are entered as covariates • GLM • Dummy coding not needed • Interactions between categorical IV’s handled easily • Need to ask for parameter estimates • Linear regression • Gives parameter estimates and standardized coefficients (i.e. to estimate causal models using path analysis)