Interacting a dummy variable with a continuous variable Consider one of the regression models in your statistics assignment: the dependent variable is county population growth from 1990 to 2000 the wtemp variable is the county’s average winter temperature the ocean variable equals 1 if the county is in a state that borders the Atlantic or Pacific ocean or the gulf coast
Interacting a dummy variable with a continuous variable The effect a change in mean winter temperature has on county population growth is given by: The winter temperature variable (wtemp) shows up twice in the regression model: on its own and interacted (multiplied) with the ocean variable
Interacting a dummy variable with a continuous variable The marginal effect can be expressed by dividing both sides by the change in wtemp The marginal effect winter temperature has on predicted growth can be distinguished between counties that are near the ocean (ocean=1) and counties that aren’t (ocean=0)
Interacting a dummy variable with a continuous variable The effect if the county is in a state that borders the ocean (ocean=1): The effect if the county is not in a state bordering the ocean (ocean=0):
The interaction term generates separate marginal effects by type of county Assuming the model is linear, b 5 >0 and b 6 <0, the marginal effects can be shown as: County Population growth rate Mean winter temperature b 5 – effect for counties that don’t border ocean b 5 + b 6 – effect for counties that do border ocean
Hypothesis Tests 1.Test for difference in marginal effect between the two types of counties: H 0 : β 6 =0 H 1 : β 6 ≠0 2.Test for significant effect of mean winter temperature on growth for the counties not bordering the ocean: H 0 : β 5 =0 H 1 : β 5 ≠0
F-test 3.Test for significant effect of mean winter temperature on growth for the counties that border the ocean: H 0 : β 5 = β 6 =0 H 1 : at least one of the parameters β 5, β 6 is not zero This hypothesis test follows the F-distribution The critical value of this test which is always one- tailed is, F α,K,n-K-1 where α is the level of significance K represents the number of parameters set to zero (in this case two) n-K-1 is the degrees of freedom in the unrestricted model In the F-table, the numerator degrees of freedom is K and the denominator degrees of freedom is n-K-1
F-test The test statistic for the F-test can be generated in SAS The SAS command to run a regression and output the F-test statistic for restrictions for some parameter estimates: proc reg; model popgrowth=pop manu medinc college wtemp wtemp_ocean; test wtemp, wtemp_ocean; The test statement will produce the test statistic for the test that the parameters for the wtemp and wtemp_ocean variables are jointly zero