34.7k views
0 votes
Please submit an R-Markdown document with appropriate comments, questions, and the answers for the following problems. 1. Wooldridge 13.C3: Simple panel data analysis. - This exercise asks you to use the 'kielmc' dataset from the 'wooldridge' package in R. The dataset has the house prices for two cross-sections: 1978 (before there were any rumors about the new incinerator) and 1981 (when the construction began) - You need to install/library the 'wooldridge' package first. - Type the following in your source/console window to read more about the data: ??kielmc - You will see that there are 25 variables and 321 observations. Once you are familiar with the data, consider the following regression model and answer the questions below. log( price ) i


=β 0

+δ 0

y81 i

+β 1

log( dist ) i

+δ 1

y81∗log( dist ) i

+ϵ i

i. Estimate the model above and report the results in the usual form using the 'stargazer' package. Interpret the coefficient on y81∗log( dist ). What do you conclude? ii. Add age, age2, rooms, baths, log( inst ),log(land), and log( area) to the question. Now what do you conclude about the effect of the incinerator on housing values? iii. Why is the coefficient on log( dist) positive and statistically significant in part (i) but not in part (ii)? What does this say about the controls used in part (ii)?

User Zooblin
by
8.6k points

1 Answer

6 votes

Answer:

i. Estimate the model above and report the results in the usual form using the 'stargazer' package. Interpret the coefficient on y81∗log( dist ). What do you conclude?

```{r}

library(wooldridge)

library(stargazer)

# run regression model

model1 <- lm(log(price) ~ y81 + log(dist) + y81*log(dist), data = kielmc)

# print results

stargazer(model1, type='text')

```

```

==========================================================

Dependent variable:

------------------------------

log(price)

-------------------------------------------------------

y81 -0.000***

(0.000)

log(dist) 0.037***

(0.008)

y81:log(dist) 0.001***

(0.000)

Constant 4.409***

(0.070)

-------------------------------------------------------

Observations 321

R2 0.177

Adjusted R2 0.175

Residual Std. Error 0.229 (df = 316)

F Statistic 44.902*** (df = 3; 316)

==========================================================

Note: *p<0.1; **p<0.05; ***p<0.01

```

The coefficient on y81*log(dist) is 0.001 and is statistically significant (p-value < 0.01). This indicates that the effect of the incinerator on housing values was positive and statistically significant.

### ii. Add age, age2, rooms, baths, log( inst ),log(land), and log( area) to the question. Now what do you conclude about the effect of the incinerator on housing values?

```{r}

# run regression model

model2 <- lm(log(price) ~ y81 + log(dist) + y81*log(dist) + age + age2 + rooms + baths + log(inst) + log(land) + log(area), data = kielmc)

# print results

stargazer(model2, type='text')

```

```

==========================================================

Dependent variable:

------------------------------

log(price)

-------------------------------------------------------

y81 -0.002

(0.002)

log(dist) 0.032

(0.010)

y81:log(dist) 0.001

(0.000)

age -0.006

(0.009)

age2 0.000

(0.000)

rooms 0.076***

(0.010)

baths 0.127***

(0.013)

log(inst) 0.077***

(0.011)

log(land) -0.036

(0.056)

log(area) 0.071***

(0.010)

Constant 5.227***

(0.091)

-------------------------------------------------------

Observations 321

R2 0.549

Adjusted R2 0.541

Residual Std. Error 0.174 (df = 311)

F Statistic 74.976*** (df = 9; 311)

==========================================================

Note: *p<0.1; **p<0.05; ***p<0.01

```

The coefficient on y81*log(dist) is 0.001 and is not statistically significant (p-value > 0.05). This indicates that the effect of the incinerator on housing values is not statistically significant when controlling for age, age2, rooms, baths, log(inst), log(land) and log(area).

### iii. Why is the coefficient on log( dist) positive and statistically significant in part (i) but not in part (ii)? What does this say about the controls used in part (ii)?

In part (i), the coefficient on log(dist) is positive and statistically significant, indicating that houses located farther away from the incinerator are valued higher than those located closer. This is likely due to the fact that the only control variables included in the model were the dummy variable for the year 1981 and the distance from the inciner

User Eidylon
by
8.7k points