1

I would like to display the confidence interval for a single predictor with coefplot() or to change the scale of the x-axis to logarithmic.

I run

fit_tripadvisor <- lm(price ~ bedrooms + bathrooms + accommodates + shared + private + tripAdvisorScore , data=manhattan_listings)
coefplot_Airbnb_TripAdvisor <- coefplot(fit_tripadvisor, predictors="tripAdvisorScore")

the first line works on building my linear model, but the second lines is giving me the following error:

Error in `$<-.data.frame`(`*tmp*`, "Term", value = character(0)) : 
  replacement has 0 rows, data has 42

The methodology described by @Lyzander in this post did not seem to work. Any suggestions?

Community
  • 1
  • 1
Stephen Kaiser
  • 113
  • 1
  • 7

0 Answers0