Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
PSC 5940: Interactions as MultiLevel Models Session 3 Fall, 2009 September 8, 2009 Session 3 Slide 1 Workshop: PRCs • Load EE data • Run a simple model: • Willingness to pay for an alternative energy tax • Use randomly assigned “price” as IV • Plot to relationship (use jitter) • Now add: Income, Ideology • Change in price variable? (Why?) September 8, 2009 Session 3 Slide 2 Model Elaboration • EE09 & NS09 Data: research thinking • Analysis of residuals • Additions to the ERDF model: • Belief in anthropogenic climate change • Recodes? • Understanding of GCC science • Recode “What scientists’ believe…” variables • Turn in 1 page summaries September 8, 2009 Session 3 Slide 3 Dummy Intercept Variables • Dummy variables allow for tests of the differences in overall value of the Y for different nominal groups in the data (akin to a difference of means) • Coding: 0 and 1 values (e.g., men versus women) Y X2,0 X2,1 X1 September 8, 2009 Session 3 Slide 4 Modeling Belief in GCC as a function of knowledge and Republican Party Identification Call: lm(formula = gcc_bel ~ R_id + gcc_knowl) Residuals: Min 1Q Median 3Q Max -16.158 -2.582 1.842 3.842 12.460 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -1.4467 0.5529 -2.617 0.00897 ** R_id -3.0135 0.3110 -9.688 < 2e-16 *** gcc_knowl 1.5210 0.1310 11.613 < 2e-16 *** --Residual standard error: 5.526 on 1507 degrees of freedom (188 observations deleted due to missingness) Multiple R-squared: 0.1468, Adjusted R-squared: 0.1457 F-statistic: 129.7 on 2 and 1507 DF, p-value: < 2.2e-16 Belief in GCC systematically lower for those who identify as Republicans September 8, 2009 Session 3 Slide 5 Dummy Variable Applications • Implies a comparison (the omitted group) – Be clear about the “comparison category” • Multinomial Dummies – When categories exceed 2 • Importance of specifying the base category • Examples of Category Variables – – – – – – Experimental treatment groups Race and ethnicity Region of residence Type of education Religious affiliation “Seasonality” • Adds to modeling flexibility September 8, 2009 Session 3 Slide 6 Interaction Effects • Interactions occur when the effect of one X is dependent on the value of another • Modeling interactions: – Use Dummy variables (requires categories) – Use multiplicative interaction effect • Multiply an interval scale times a dummy (also known as a “slope dummy”) • Example: the effect of GCC knowledge (gcc_knowl) on belief in climate change (gcc_bel) may be affected by whether the respondent identifies with the Republican Party (R_id) – Re-code the interaction; run it. September 8, 2009 Session 3 Slide 7 Modeling belief in Climate Change with a Dummy Slope Variable: Knowledge* Republican ID (=1) Call: lm(formula = gcc_bel ~ R_id + gcc_knowl + gcc_kn_R) Residuals: Min 1Q Median 3Q Max -15.971 -2.610 1.691 4.029 13.826 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -0.6831 0.6696 -1.020 0.3079 R_id -5.1433 1.1007 -4.673 3.24e-06 *** gcc_knowl 1.3308 0.1613 8.252 3.37e-16 *** gcc_kn_R 0.5563 0.2758 2.017 0.0439 * --Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 5.521 on 1506 degrees of freedom (188 observations deleted due to missingness) Multiple R-squared: 0.1491, Adjusted R-squared: 0.1474 F-statistic: 87.99 on 3 and 1506 DF, p-value: < 2.2e-16 September 8, 2009 Session 3 Slide 8 Illustration of Slope Interaction Not Republicans Republicans September 8, 2009 Session 3 Slide 9 BREAK September 8, 2009 Session 3 Slide 10 Workshop • Build Fully Interacted Models • Dependent Variable Suggestions: • Willingness to pay for an alternative energy tax • Importance of Retaining US nuclear weapons stockpile • Risk of Climate Change • Risk of Nuclear Energy • Independent Variables: Income, Ideology • Interact with Party ID • Interact with religion • Constructed category (options…) • 1-page paper due next week September 8, 2009 Session 3 Slide 11