How do I analyse the relation between prices and locations of properties without considering their sizes?

by Philipp   Last Updated April 15, 2019 11:19 AM

I want to analyze the prices of properties depending on the location but without considering their size. The location can be "excellent", "good", "average", "bad". I want to create 4 boxplots comparing the prices in the locations. The size is given as a number.

In R I could write:

boxplot(price~location, data=mydata)

which wouldn't be correct because the price obviously also depends on how big the property is, so I could write instead:

boxplot(price/size~location, data=mydata)

But my task is to not have the size in my formula and to normalize the price in another way which is supposed to be better. Does anyone know how to do that?

Tags : r


Answers 1


The statement "without considering their size" may mean different things and therefore different answers are possible.

The first meaning is just not taking size in account. That is:

boxplot(price~location, data=mydata)

Of course, price depends on a lot of variables different than location, including size and many more. The effect of those variables affect response in two ways:

(to be expanded)

Pere
Pere
April 15, 2019 11:16 AM

Related Questions