Download presentation

Presentation is loading. Please wait.

Published byEstefany Paskett Modified about 1 year ago

1
Dummy Variables and Interactions

2
Dummy Variables What is the the relationship between the % of non-Swiss residents (IV) and discretionary social spending (DV) in Swiss municipalities?. reg def_social_head log_pctforeign if year==2005 Source | SS df MS Number of obs = F( 1, 1149) = 0.54 Model | Prob > F = Residual | R-squared = Adj R-squared = Total | Root MSE = def_social_h~d | Coef. Std. Err. t P>|t| [95% Conf. Interval] log_pctforeign | _cons | Data drawn from 6 different cantons (states).

3
Dummy Variables. tabstat def_social_head pctforeign, by(canton) Summary statistics: mean by categories of: canton canton | def_so~d pctfor~n | | | | | | Total |

4
Dummy Variables We can control for the fact that municipalities are drawn from different cantons by allowing the default expectation (intercept) for each canton to vary:. reg def_social_head log_pctforeign i.canton if year==2005 Source | SS df MS Number of obs = F( 6, 1144) = Model | Prob > F = Residual | R-squared = Adj R-squared = Total | Root MSE = def_social_h~d | Coef. Std. Err. t P>|t| [95% Conf. Interval] log_pctforeign | | canton | 2 | | | | | | _cons | Canton 1 is a ‘reference category’ – the intercept for canton 1 is “_cons”

5
Dummy Variables This is not the same as running separate regressions for each canton, because we still assume that the slope is identical for every subgroup. Social Spending = B0 + B1*Log_Pctforeign + B2*Canton1 + B3*Canton2 + B4*Canton3 … For municipalities in Canton 1: Social Spending = B0 + B1*Log_Pctforeign + B2*1 + B3*0+ B4*0 … Social Spending = (B0 + B2) + B1*Log_Pctforeign For municipalities in Canton 2: Social Spending = B0 + B1*Log_Pctforeign + B2*0 + B3*1+ B4*0 … Social Spending = (B0 + B3) + B1*Log_Pctforeign All we are doing is changing the starting value -- allowing the expectation when log_pctforeign = 0 to differ across cantons. B1 still describes the effect of Log_Pctforeign on Social Spending across the entire sample.

6
Dummy Variables What would happen if I added the following variables to the previous regression: A)Variable that measures whether a canton is German-speaking (1) or French- speaking (0) B)Variable that measures average GDP per capita in the canton. B)Variable that measures whether a municipality allows (1) or does not allow (0) immigrants to vote.

7
Dummy Variables and Interactions We can allow the relationship between log_pctforeign and def_social_head (the “slope”) to vary for each canton by using interactions: Social Spending = B0 + B1*Log_Pctforeign + B2*Canton1 + B3*Canton2 … + B4*Canton1*Log_Pctforeign + B5*Canton2*Log_Pctforeign … For municipalities in Canton 1: Social Spending = B0 + B1*Log_Pctforeign + B2*1 + B3*0+ B4*1*Log_Pctforeign + B5*0*Log_Pctforeign Social Spending = (B0 + B2) + (B1 + B4)Log_Pctforeign For municipalities in Canton 2: Social Spending = (B0 + B3) + (B1 + B5)Log_Pctforeign This is the same as estimating the relationship between social spending and log_pctforeign separately for each subgroup. We are assuming that the relationship differs in each canton.

8
Interactions Interactions should be justified by theory. For instance, we might reasonably assume that the relationship between % foreign and social expenditure would be different if municipalities allowed immigrants to vote. Voteright is a variable coded 1 if immigrants have voting rights in a municipality, 0 otherwise.. gen logpctforeignXvoteright = voteright * log_pctforeign. reg def_social_head log_pctforeign logpctforeignXvoteright voteright i.canton if year == def_social_head | Coef. Std. Err. t P>|t| [95% Conf. Interval] log_pctforeign | logpctforeignXvoteright | voteright | | canton | 2 | | | | | | | _cons |

9
Interactions Social Spending = B0 + B1*Log_Pctforeign + B2*Canton1 + B3*Canton2 + … B4*VotingRights + B5*Log_Pctforeign*VotingRights For non-immigrant voting municipalities in Canton 1: Social Spending = B0 + B1*Log_Pctforeign + B2*1 + B3*0+ +B4*0 + B5*Log_Pctforeign*0 Social Spending = (B0+B2) + B1*Log_Pctforeign For immigrant voting municipalities in Canton 1: Social Spending = B0 + B1*Log_Pctforeign + B2*1 + B3*0+ +B4*1 + B5*Log_Pctforeign*1 Social Spending = (B0+B2+B4) + (B1+B5)*Log_Pctforeign

10
Direct + Indirect Effects Direct Effect = Multivariate Regression Coefficient Indirect Effect = Bivariate – Multivariate

Similar presentations

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google