I'm trying to estimate the value of an apartment, by doing a regression through similar apartments. The regression model looks now like this lmRob(price ~ ., data = data)
, but this is clearly wrong.
My problem is modelling / defining explanatory variables which depend on each other. For example elevator
and floor number
depend on each other. If the apartment is at ground floor, the existence of a elevator is irrelevant. But if the floor number is higher, the importance of the existence of the elevator is also higher. How could I model this in my regression model?
[UPDATE]
I also don't want a model that requires an apartment which is located at ground floor and an elevator exists to be equally valuable as a similar apartment also located at ground floor but without elevator. Instead, what I want is to have a variable which substitutes the two variables floor number
and elevator
and in which the importance of an elevator
depending on the floor number
is shown.
elevator
andfloor number
? $\endgroup$0.34
for them. $\endgroup$