80 likes | 682 Views
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
E N D
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):
County Population growth rate b5 – effect for counties that don’t border ocean b5 + b6 – effect for counties that do border ocean Mean winter temperature The interaction term generates separate marginal effects by type of county • Assuming the model is linear, b5>0 and b6<0, the marginal effects can be shown as:
Hypothesis Tests • Test for difference in marginal effect between the two types of counties: H0: β6=0 H1: β6≠0 • Test for significant effect of mean winter temperature on growth for the counties not bordering the ocean: H0: β5=0 H1: β5≠0
F-test • Test for significant effect of mean winter temperature on growth for the counties that border the ocean: H0: β5= β6=0 H1: 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