子集一预测器coefplot()r

时间:2017-04-10 23:56:22

标签: r regression linear-regression coefplot

我想用coefplot()显示单个预测变量的置信区间,或者将x轴的比例更改为对数。

我跑

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

第一行用于构建我的线性模型,但第二行给出了以下错误:

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

@Lyzander在this post中描述的方法似乎不起作用。有什么建议吗?

0 个答案:

没有答案