r - R 函数 miperform_lr 给出错误“中断不是唯一的”
问题描述
我是这个论坛的新手,所以我希望我能以一种可以理解的方式描述我的问题。非常感谢您查看它。
在 R Studio 中,我使用一个名为miperform_lr
(psfmi-package 的一部分)的函数来验证模型。但是,当我尝试运行该miperform_lr
函数时,会出现以下错误:
“cut.default(pred.i[[i]], quantile(pred.i[[i]], c(seq(0,1,0.1)))) 中的错误:'breaks' 不是唯一的”
不幸的是,我无法进入 miperform_lr 函数,但这是一般语法:
"miperform_lr(data, nimp=5, impvar=NULL, Outcome, predictors=NULL, cat.predictors=NULL, int.predictors=NULL, cal.plot=FALSE, plot.indiv=FALSE, int.val=FALSE, method="boot", B=250, bw=FALSE, rule="p", type="individual", p.val=0.05, force=NULL)
我已经检查了哪个输入给出了问题,这是输入“预测变量”。对于预测变量,我使用了 4 个具有以下特征的变量:
- Variable A: dichotomous variable, 0 or 1
- Variable B: dichotomous variable, 0 or 1
- Variable C: dichotomous variable, 1 or 2
- Variable D: dichotomous variable, 1 or 2
有谁知道为什么我会收到上述错误?
解决方案
可能您的预测概率范围正在缩小。您现在可以从 github 下载 miperform_lr 函数的新开发版本,您也可以使用 groups_cal =5 选择 5 个组。也许这对你有用。请参阅(https://github.com/mwheymans/psfmi)。
推荐阅读
- python-3.x - 为什么这段代码给了我想要的输出,如果数字序列是 1、2、3,它应该返回 True
- asp.net - 在执行 SQl 任务中删除具有 2 个或更多参数的 ssis 包中的查询
- bash - 对两个文件夹中文件之间的每个组合运行一个进程
- python - Django Restful 中的 ListSerializer - 何时调用?
- swift - 如何快速实现相机
- c - 链表在执行期间不复合
- batch-file - 在cmd中将结果从FIND发送到IF
- r - 在R中查找数据框的分组变量的交集
- ant - 通过 ANT 运行 JMETER 脚本时在转换过程中出现致命错误
- reactjs - 如何在 React 中切换 div 内的过滤列表项?