r代写-BNAL 711
时间:2021-10-05

BNAL 711 Multivariate Statistical Methods for Business Multiple Regression IV Wooldridge CH7 Outline • Multiple regression with qualitative data • Dummy variables • Interpretation when log(DV) • Multiple dummies • Dummy interactions • Testing group difference 2 Describing Qualitative Information • Qualitative Information • Examples: gender, race, industry, region, rating grade, … • A way to incorporate qualitative information is to use dummy variables (a.k.a., a binary variable or a zero-one variable) • They may appear as the dependent or as independent variables • A single dummy independent variable • Naming convention: The name indicates the event with the value 1 • Why do we use the values zero and one to describe qualitative info? • These values are arbitrary: any two different values would work • The real benefit of using zero-one: the parameters have very natural interpretations Dummy variable: =1 if the person is a woman =0 if the person is a man = the wage gain/loss if the person is a woman rather than a man (holding other things fixed) 3 • Graphical Illustration Alternative interpretation of coefficient: i.e. the difference in mean wage between men and women with the same level of education. Intercept shift Graphical Illustration of Interpretation d0 determines whether there is discrimination against women: if d0 < 0, then for the same level of other factors, women earn less than men on average 4 • Dummy variable trap This model cannot be estimated (perfect collinearity) When using dummy variables, one category always has to be omitted: Alternatively, one could omit the intercept: The base category are men The base category are women We prefer NOT to use this formulation (see p.214 for detailed explanation): 1) Not directly showing the difference 2) R-squared formula only valid if regression contains intercept How to set up dummy variables (# levels minus 1) g0 and d0 are accurate, no “dummy variable trap” 5 • Estimated wage equation with intercept shift • Does that mean that women are discriminated against? • Test the coef for female and find it is significant • Holding education, experience, and tenure fixed, average wage for female is 1.81 less than male • The differential of $1.81 is due to gender or factors associated with gender that we have not controlled for in the regression Holding education, experience, and tenure fixed, women earn $1.81 less per hour than men Wage example 6 • Comparing means of subpopulations described by dummies • Discussion • It can easily be tested whether difference in means is significant • The wage difference between men and women is larger if no other things are controlled for; i.e. part of the difference is due to differences in education, experience, and tenure between men and women (these are lower, on average, for women than for men in this sample) • Given this result, what’s the average wage for men? For women? Not holding other factors constant, women earn $2.51per hour less than men, i.e. the difference between the mean wage of men and that of women is $2.51. Wage example and connection to ANOVA aov(wage ~ as.factor(female), data = wage1) 7 • Using dummy explanatory variables in equations for log(y) Dummy indicating whether house is of colonial style As the dummy for colonial style changes from 0 to 1, the house price increases by 5.4 percentage points Interpreting coef when DV is log-transformed See Wooldridge p.212 Example 7.5 for an example of accurate estimate of the coef approximate 11 Multiple dummy variables (connecting to ANOVA) • Example: marriage (single vs. married) & gender (male vs. female) • Wage ~ single + female + other variables • How to interpret the coefficients for single and female? • Do we assume the marriage effect same for men and women? • How do I test if the marriage effect is the same for men and women? 12 • Using dummy variables for multiple categories • 1) Define membership in each category by a dummy variable • 2) Leave out one category (which becomes the base category) • Which is the base category for the example below? • Is the marriage effect same for men? • Is the gender effect same for being single? • Is the marriage effect same for women? (2 approaches) Holding other things fixed, married women earn 19.8% less than single men (= the base category) Dummies for multiple categories 13 R Demo • Interactions among dummy variables • Example: wage ~ married * female + other variables (R demo) • What is the reference group? What does the intercept mean? • What’s the mean difference between married female vs. single female? • Plug in and contrast between (married = 1, female = 1) and (0, 1) • Find the correspondence between this result and the result from multiple dummies • Recall from CH6 slides, what is the average partial effect (APE) for gender? • Both have the same R^2 and can show differences b/w group means • The interaction model more easily shows the APE of a variable Interactions involving dummy variables 15 lm(lwage ~ female * married + educ + exper + expersq + tenure + tenursq, data = wage1) • Interactions between dummy and numerical variables • Allowing for different slopes • Interesting hypotheses = intercept men = intercept women = slope men = slope women Interaction term The return to education is the same for men and women The whole wage equation is the same for men and women Interactions involving dummy variables 16 • Graphical illustration Interacting both the intercept and the slope with the female dummy enables one to model completely independent wage equations for men and women Possible interaction outcomes 17 • Estimated wage equation with interaction term No evidence against hypothesis that the return to education is the same for men and women Does this mean that there is no significant evidence of lower pay for women at the same levels of educ, exper, and tenure? No: this is only the effect for educ = 0 (very few people have 0 educ). To answer the question one has to recenter the interaction term, e.g. around educ = 12.5 (= average education). Interpretating the wage example 18 Next, how to test ? Testing for Differences in Regression Functions across Groups • Whether cumgpa follows the same model for males and females • Null hypothesis? • Unrestricted model (contains full set of interactions) • Restricted model (same regression for both groups) 19 College grade point average Standardized aptitude test score High school rank percentile Total hours spent in college courses To allow for an intercept difference, we can include a dummy variable for either males or females. If we want any of the slopes to depend on gender, we simply interact the appropriate variable with, say, female, and include it in the equation. • Estimation of the unrestricted model (R demo) • F-test Tested individually, the hypothesis that the interaction effects are zero cannot be rejected Testing for Differences in Regression Functions across Groups 20 Null hypothesis is rejected R Practice for CH7 • Now Use the full data 401KSUBS (Wooldridge data “k401ksubs”) 23 that means to include main and quadratic effects of income and age 




























































































































































































essay、essay代写