The city counsel on Boston would like to limit the number of overpriced and under represented Airbnb listings in the Boston area. The new rules require that hosts own the properties they rent out, and live in them for at least nine months of the year every year as well as pay an annual licensing fee. Many have not paid their fees and the city needs to perform an audit. But with few auditors available they need to limit their search. The city would like to narrow the listings to how many higher priced listings, with lower reviews than average, and are available more than 90 days per year. The Director housing of Boston would like to know if, the number of listings that are the top (approximately) 15%-25% of listings in terms of price, show fewer and lower reviews than average, and are available more than 90 days per year. What the average price, number of days available, ratings and number of ratings posted. This will be the initial target of their audit. data boston_airbnb_listings; set boston_airbnb_listings; price_numeric = input(price, comma32.); run; /* Data step to calculate percentiles and mean reviews and filter */ data work.boston_airbnb_ratings; set work.boston_airbnb_listings; /* Use PROC SUMMARY to calculate percentiles and mean */ proc summary data=work.boston_airbnb_listings nway; var price_numeric; output out=summary_stats p15= p15 p25= p25 mean= mean_reviews; run; end; /* Filter based on criteria: top 15%-25% of listings in terms of price, lower reviews, and available > 90 days */ if price_numeric >= p15 and price_numeric <= p25 then output; run; how can i revise this step?
... View more