course-dprep / what-influences-AirBnB-prices

Estimating the effect of Hawaiian AirBnB listing characteristics, the time until the booking starts (in days) and the season on the price per night.
2 stars 4 forks source link

Review and prepare beds and bedrooms variable #16

Closed MerelvStekelenburg closed 2 years ago

MerelvStekelenburg commented 2 years ago

There are some NA's for the bedrooms variable. I checked a few and they either have 1 bedroom or the listing is a studio/has 1 room in total. How should I proceed from here? Should I classify the NAs as 1 bedroom?

MerelvStekelenburg commented 2 years ago

There are also some NA's in the beds variable. Is it best to leave those and exclude them from the analysis? I manually checked a few listings and they all have a different number of beds so replacing an NA with a 1 would not be accurate.

ana-bianca-luca commented 2 years ago

I don't think it's safe to make any assumptions since there is no pattern in the two columns, so the only option I see is excluding them

ana-bianca-luca commented 2 years ago

we could also replace the NAs with the mean value

MerelvStekelenburg commented 2 years ago

Created a pull request for the code to prepare the data. NAs in bedrooms replace with 1 if the listing type is hotel room, private room, or shared room. NAs in beds replaced with 1 if the listing accommodates 1.