Dummy Variable Regression Models
- 格式:doc
- 大小:140.81 KB
- 文档页数:6
Dummy Variable Regression Models1. The nature of dummy variable● In regression analysis dependent variable is influenced not only by the quantitative variablesbut also by the qualitative variables, such as sex, skin color, region, nationality, etc)● Such variables usually indicate that the presence or absence of a “quality ” or an attribute,they are essentially nominal scale variables.● One way we could “quantify ” such attributes is by constructing the artificial variables thattaken on values 1 or 0, 1 indicating the presence of that attribute and 0 indicating the absence of that attribute.● Variables that assume such 1 and 0 values are called dummy variable● A regression can contain the variables that are all exclusively dummy. For example:i i i u D Y ++=βαWhere Y = salary of college professorD =1 if professor is male=0 if professor is female● Mean salary of male professor: βα+==)1/(i i D Y EMean salary of female professor:α==)0/(i i D Y E● Mean salary of female professor is given by the intercept α, and the slope coefficient βtells how much the mean salary of male professor differs from the mean salary of female professor. α+β reflects the mean salary of male professor● Regression can contain a mixture of quantitative and qualitative variables. For example:i i i i u X D Y +++=βαα21Where Y i = salary of college professorX i = teaching yearsD i = 1 if professor is male= 0 if professor is female● Hold the same assumption as before that E (u i )=0Mean salary of male professor:i i i X D Y E βαα++==)()1/(21Mean salary of female professor: i i i X D Y E βα+==1)0/(● Figure● Above model assumes that professor ’s salary is the function of teaching years with the same slope but different intercept● If 2αis statistically significant, there would be gender discrimination● Above dummy variable model has the following properties:(1) To distinguish two categories: male and female, we introduce a dummy variable. If wewrite the model like this:i i i i i u X D D Y ++++=βααα33221D 2i = 1 if professor is male, = 0 otherwiseD 3i = 1 if professor is female, = 0 otherwise◆ D 2 and D 3 have perfect multicollinearity, can not estimate the model. “Dummy variabletrap ”◆ Example◆ Rule: If a qualitative variable has m categories, introduce only (m-1) dummy variables(2) In our example, take D=1 for male. But whom would be taken D=1 is random. If takingD=1for female,2αcould have a contrary sign(3) The category for which no dummy variable is assigned is called base or benchmarkcategory. And all the comparisons are made in relation to the benchmark category(4) The coefficient of dummy variable 2αis called as differential intercept coefficient2. examine the structural stability of a regression model● Up to now, the considered qualitative variable only affects the intercept. It does not affect the slope coefficient● How about the result if the slope coefficient changes? Consider UK saving – income data● The data is divided into two parts. 1946-1954 is the post war re-establishment period. 1955-1963 is the late re-establishment period● We would like to check whether the saving – income relationship has change or notRe-establishment period: 1121n 1,2,...,i ,=++=i i i u X Y λλLate re-establishment period:2221n 1,2,...,i ,=++=i i i u X Y γγ Y = saving, X = income● Four possibilities:-- 2211 γλγλ==and , that is, two regressions are exactly same – coincident regression (figure) --2211 γλγλ=≠and , intercept coefficients are different but slope coefficients are the same - parallel regression-- 2211 and γλγλ≠=, intercepts are the same but the slopes are different - concurrent regression --2211 γλγλ≠≠and , both intercepts and slopes are different - dissimilar regression● Through some statistical techniques, we can examine all of above possibilities, i.e. examine whether the saving function has structural changes over two periods6. Comparing two regressions: dummy variable approach● Mix up the n 1 and n 2 observations, estimate the following model: i i i i i i u X D X D Y ++++=)(2121ββααWhere Y and X represent saving and income, D = 1 if the observation belongs to the first period,D = 0 if the observation belongs to the second period● In order to understand better the meaning of the model, assume 0)(=i u E , theni i i i X X D Y E βα+==1),0/(i i i i X X D Y E )()(),1/(2121ββαα+++==● Same as before, 2α is differential intercept. 2β is differential slope coefficient● The introduction of the dummy variable D in the interaction form enables us to differentiate between slope coefficients of the two periods. The introduction of the dummy variable in the additive form enables us to distinguish between the intercepts of the two periods.● Back to the saving income data, estimation result is:(-3.1144) (9.2238) (3.1545) (-5.2733) 1034.01504.04839.17502.1ˆti t i t X D X D Y -++-=9425.02=R● Re-establishment period and late re-establishment (figure)● The advantage of dummy variable approach:(1) We need to run only a single (total) regression(2) This single (total) regression can be used to test a variety of hypotheses(3) It not only tells if the two regressions are different but also pinpoints the sources of thedifference – whether it is due to the intercept or the slope or the both(4) Since pooling increases the degree of freedom, it may improve the relative precision ofthe estimated parameters3. Interaction effect using dummy variables● Consider the following model:i i i i i u X D D Y ++++=133221βαααWhere Y = the expenditure on clothes, X = income, D 2 =1 for female, 0 otherwise, D 3 =1 for college graduates, 0 otherwise● If the female consume more on the clothes than the male, then it is so no matter whether they are college graduates or not. By the same way, if college graduates consume more on the clothes than the non college graduates, then it is so no matter they are male or female.● In many applications, such an assumption may be untenable● There may be interaction between the two qualitative variables● From i i i i i i i u X D D D D Y +++++=132433221)(βαααα, we get i i i X X D D Y E βαααα++++===)(),1,1|(4321322α= differential effect of being female3α= differential effect of being college graduates4α= differential effect of being female college graduates● The interaction dummy can modify the effect of the two attributes considered individually4. The use of dummy variables in seasonal analysis● Many economic time series based on monthly or quarterly data exhibit seasonal pattern.Examples are sales of department stores at Christmas, demand for ice cream during summer● The process of removing the seasonal component from a time series is calleddeseasonalization or seasonal adjustment● Example: adding seasonal dummies, we would like to do a regression of the profit of the USmanufacture industry on its sales over 1965-1970i i i i i i u sales D D D profit +++++=)14433221(βααααwhere D 2 = 1 for the II quarter, 0 for others; D 3 = 1 for the III quarter, 0 for others; D 4 = 1 for the IV quarter, 0 otherwise● Estimation result:(3.3313) (0.281) (-0.3445) (2.072) (3.9082) )0383.018421813236688ˆ432i i i i i i u sales D D D t profi +++-+=(● We can also add only one dummy variable by controlling the others5. Piecewise linear regression● We would like to know how a hypothetical company remunerates its sale representatives. Itpays commissions based on sales in such a manner that up to a certain level X*, there is one commission structure and beyond that level another● piecewise linear regression consists of two linear pieces or segments and the commissionfunction changes its slope at the threshold value● Given the data on commission, sales and the value of the threshold level X*, the technique ofdummy variables can be used to estimate the slopes of two segments of the piecewise linear regressionY = sales commission, X = volume of sales generated by the sales person, X* = threshold value of sales also known as a knot, D=1,if*X X i >,=0 if *X X i <● Assume 0)(=i u E , we see at once the mean sales commission up to the target level X*i i i i X X X D Y E 11*),,0/(βα+==Beyond the target level X*i i i i X X X X D Y E )(**),,1/(2121βββα++-==● Total cost in relation to output5500X* 9737.0R (1.1447)(6.0669) (-0.8245) *)(0945.02791.072.145ˆ2==-++-=i i ii D X X X Y。