13.1 Exercises

  1. Indy Homes II (***): Consider the data in indyhomes. A real estate agent once mentioned that homes built in the eighties are of lower quality and are thus cheaper. One possibility to asses this claim is with an ANOVA model. Add three new dummy variables to the data frame: eighties (equal to 1 if the home was built in any year between 1980 to 1989), northwest (equal to 1 if the home is in the 46268 ZIP code), and single story (equal to 1 if the home has one story). Estimate the following ANOVA model: \[price = \beta_0+\beta_1 \cdot d_{80s}+\beta_2 \cdot d_{northwest} + \beta_3 \cdot d_{single}\] What do you conclude? Next, add square footage to the model. What has changed in terms of coefficients? How do you interpret that change?

  2. State Capitals II (**): Consider the data in apartments, which contains information about furnished apartments in Berlin and Potsdam. You are going to estimate four models with either \(rent\) or \(\ln(rent)\) as the dependent variables and \(location\) and \(company\) as the independent variables. Model 1 can be written as follows \[rent = \beta_0+\beta_1 \cdot location\] Model 2 can be written as follows \[rent = \beta_0+\beta_1 \cdot location + \beta_2 \cdot company\] Model 3 can be written as follows \[\ln(rent) = \beta_0+\beta_1 \cdot location\] Model 4 can be written as follows \[\ln(rent) = \beta_0+\beta_1 \cdot location+ \beta_2 \cdot company\] Since there are multiple companies and R/RStudio will create factors for each of them, you will have more than just \(\beta_2\) coefficients. Interpret the coefficients. How do the coefficients change?