solution

Suppose a realtor wants to model the appraised price of an apartment in Vitoria as a function of the predictors living area and the status of the apartment’s conservation. Consider the data frame vit2005, which contains data about apartments in Vitoria, Spain, including total price, area, and conservation. The variable conservation has four levels: 1A, 2A, 2B, and 3A.

(a) Define a new conservation variable called conservation1 with three levels, A, B, and C, where A = 1A, B = 2A, and C = 2B and 3A together. Define the corresponding dummy variables considering A (the first category) as the reference category.

(b) Write and fit separate linear regression models (different intercepts and different slopes) for each conservation1 category.

(c) Construct a single scatterplot of the data where the fitted models are superimposed over the scatterplot.

 
"Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!"
Looking for a Similar Assignment? Our Experts can help. Use the coupon code SAVE30 to get your first order at 30% off!

Hi there! Click one of our representatives below and we will get back to you as soon as possible.

Chat with us on WhatsApp