家庭在CAMAN包中

时间:2014-05-27 20:35:52

标签: r

我想问一下R中的CAMAN包。我正在尝试使用二项式分解的混合物,但它给了我警告:

In dbinom(x[1], x[2], prob) : NaNs produced

这是我的因变量

的向量
x <- c(25, 23, 26, 25, 16, 10, 26, 20, 5, 0, 19, 4, 20, 15, 26, 0, 26, 7, 23, 19,
21, 3, 18, 18, 9, 22, 9, 28, 22, 16, 11, 24, 10, 12, 24, 15, 25, 12, 29, 16, 
29, 20, 30, 0, 26, 23, 22, 24, 26, 15, 5, 0, 5, 15, 25, 25, 25, 20, 25)

mix <- mixalg(x, weights=NULL, family="binomial", data=Data, pop.at.risk=NULL,
var.lnOR=NULL, limit=0.01, acc=0.001, numiter=5000, startk=50)

出了什么问题?

1 个答案:

答案 0 :(得分:0)

取出data=Data参数。或者,如果您正在使用其他数据,请发布。否则,运行代码时没有错误。

#session Info-----------------
R version 3.0.2 (2013-09-25)
Platform: x86_64-pc-linux-gnu (64-bit)

locale:
[1] C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] CAMAN_0.67        sp_1.0-14         RJSONIO_1.0-3     datacampSCT_0.1  
[5] unixtools_0.1-1   interceptHelp_1.0 RAppArmor_1.0.1  

loaded via a namespace (and not attached):
[1] grid_3.0.2      lattice_0.20-24 parallel_3.0.2  tools_3.0.2