# Refining a linear regression model for condominium prices

I'm hoping someone here is able to help me refine a linear regression model I'm working on at work. I am in no way a statistician, but I guess I have the most experience (basic stats course and decently capable with excel) in my office.

I've been tasked with creating a model that would help predict condo prices (dependent variable) in a particular city. I've collected data from the Multiple Listing Service for use as my independent variables. The data I am collecting is from condos that have sold or are currently active within the last 6 months, and that are between 0 and 2 years old. The data is also limited to 4 storey wood-frame construction within a particular city.

The independent variables I have used are: Square footage, top floor (dummy variable), corner unit (dummy), unit type (1 bed, 2 bed etc.), exposure (dummy, direction it faces), material spec (quality of finishings). I have since dropped exposure from the equation because it wasn't statistically significant (t stat was was around .3 - .4). All of the other coefficients have a t Stat over 2, however two of them are confusing me. The top floor and corner unit coefficients have a negative relationship when logically they should have a positive one. In my experience, top floor and corner units hold a premium over lower level and inside units.

Does anyone have any idea why this could be? I have around 40 samples so far, would expanding my data set to include more samples help fix this? Also, I understand real estate prices can be a tricky thing to model because of subjective variables that can't really be accounted for. Anyways, any help would be appreciated as I am trying to learn about regression as I work on this!

Sincerely,

Rob

-
Are "top floor" and "corner unit" correlated with each other? –  Andy W Jun 21 '11 at 19:21
Sorry, I should've said those coefficients have a negative relationship with the dependent variable (price), but a top floor unit is not necessarily a corner unit and vice versa. –  Rob Jun 21 '11 at 21:08
I think @Andy understood your problem. What he was getting at was that if two covariates are highly collinear, then one will tend to "compensate" for the other. So you can get a negative value for one and positive for another. This makes interpretation of the sign of a particular coefficient estimate a very slippery matter. –  cardinal Jun 22 '11 at 13:14
It sounds like you have a sample size of 40 and at least 10 total predictors. Your current model can be interpreted as taking the square footage and multiplying it by a constant to get a "base" price. Then adding/subtracting constant dollar amounts based on additional "features" of the unit. Increasing your sample size could help matters. –  cardinal Jun 22 '11 at 13:24
Dropping exposure sounds like a questionable thing to do, though it may need to be recoded according to the building the unit is in, perhaps on a subjective basis. For example, in North America, southern exposure is probably generally desirable due to increased sunlight. However, if you're in a large urban area and there's a big park just to the west of your condo, then western exposure may be highly desirable. –  cardinal Jun 22 '11 at 13:30

Since you are looking for predictive value, you should not necessarily drop out a variable (exposure) based on a significance test. There are methods out there that select variables based on criteria more aimed at good prediction (generally based on crossvalidation or other bootstrap-alike techniques). I doubt you will find these in Excel though. I greatly advise LASSO, e.g. with any measure of predictive value (feel free to ask more info). Note that most of these techniques are basically forms of linear regression with a twitch that finds the coefficients that can be set to zero.

Your number of observations is not exactly high for your number of covariates, but if this becomes an option, it will be interesting to add interaction terms (which I understand you have not done yet).

As for reasons why this or that variable is in your model: I'd be wary of making strong statements about that from your sample size (especially considering the number of covariates, again).

-
From a quick google search, LASSO = least absolute shrinkage and selection operator and AUC = area under the curve? How would I go about using these? Also, which program would you recommend rather than Excel? The reason I'm using Excel is because it's already installed on my computer, so we don't need to purchase new software. I have a trial version of Minitab for another couple of weeks if that would be better to use. –  Rob Jun 21 '11 at 21:14
Statistics + free = R. You want to go there. It might take you a while to get going, and please read the introduction to R and do everything it says, but other than that: excellent, much more robust and trustworthy than Excel and free all the way. If you do start using it, I'd also advise using some editor, like Tinn-R. It will save you a lot of time and work. LASSO and AUC are in R too (in a freely downloadable package called glmnet - but you'll understand that once you get the hang of R). Do yourself this huge favor! –  Nick Sabbe Jun 21 '11 at 21:21
Also, using the LASSO & AUC techniques, I'd be able to identify which coefficient can be set to zero, as you said, which would then mean the coefficient is not important/useful for said model? Which variables do you feel would benefit from adding interaction terms? I understand interaction terms are used when two or more variables influence each other in a non-linear fashion, is that correct? Sorry for all the questions, I'm in a bit over my head with this but I like to learn ;) –  Rob Jun 21 '11 at 21:23
Whew. For what interaction terms are, I'd point you in the direction of a beginner's course in linear regression, because any answer I can give you in 500 characters is going to fall short. As for which ones to include: gravely oversimplifying matters: if your model/variable selection method can handle it: add as many as possible. The model selection should then point you (by setting some coefficients to zero) to the ones you can 'safely' leave out. Especially if you are mainly out for best prediction, not interpretation of how the model works, as I guess is the case here, you can do that. –  Nick Sabbe Jun 21 '11 at 21:32
@Nick: The last few years, there has been substantial progress on evaluating model-selection properties of the lasso. See Knight & Fu (2000), Zhao & Yu (2006), Meinshausen & Buhlmann (2006) and Meinshausen & Yu (2009), for example. –  cardinal Jun 22 '11 at 13:41

How many top floor units are there? How many corner units? It's possible these variables are being thrown off by a couple of outliers, which isn't hard when you have so few samples.

One thing you can do is look for dependencies between variables. Maybe all/most of the top floor units in your dataset happened to be from cheaper quality buildings, or smaller units. You won't see a dependence if the units are cheaper for a reason that isn't reflected in your independent variables, like location (probably one of the most predictive variables in housing price models).

-

I didn't see condo fee as one of your independent variables. "Penthouse" units usually have a higher condo fee. The higher the condo fee the less the unit will sell for.

-

You say that your sample size is 40 and that:

The data I am collecting is from condos that have sold or are currently active within the last 6 months, and that are between 0 and 2 years old. The data is also limited to 4 storey wood-frame construction within a particular city.

If I were you, I would want a larger sample. It may be that the only way to get a larger sample is to remove some of the constraints you list above on the type of data you start with. Instead of restricting your data to only the most recent, you could include date of sale as a predictor. This would capture a linear trend in prices. There are probably seasonal effects as well so you may want to include dummy/indicator variables for that as well. You could do something similar for age-of-unit, but expect that to be non-linear - I might break it into categories. Also, you don't mention a variable for those all important real-estate considerations: location, location or location.

-