0
我最初想在我的前瞻Logistic回归模型(BinaryOutcomeVar〜ContinuousPredVar + ContinuousPredVar^2 + ContinuousPredVar^3)上运行boxTidwell()
(在“车”包中找到)分析。我碰到的问题:boxTidwell函数可以处理二元结果变量吗?
Error in x - xbar : non-numeric argument to binary operator
In addition: Warning message:
In mean.default(x) : argument is not numeric or logical: returning NA
所以,我创建了一个可再现例如用于证明错误:
不起作用:
boxTidwell(formula = Treatment ~ uptake, other.x = ~ poly(x = colnames(CO2)[c(1,2,4)], degree = 2), data = CO2)
boxTidwell(y = CO2$Treatment, x = CO2$uptake)
作品:
boxTidwell(formula = prestige ~ income + education, other.x = ~ poly(x = women , degree = 2), data = Prestige)
我一直在玩other.x
参数,我猜是这个问题。
问题
因此,没有人知道,如果1. boxTidwell()
函数与二元结果变量2. other.x
背后的逻辑的作品,因为我不能让我的虚拟实例要么工作。
所以你期望我们去寻找这个功能? – 2014-12-03 18:15:38
恩,图书馆(汽车)?我应该把这个问题加入到这个问题吗 – 2014-12-03 18:16:26
是的。每当你有一个非默认包的函数时,你应该包含一个加载包的库调用。 – 2014-12-03 18:17:36