【发布时间】:2015-04-28 11:55:19
【问题描述】:
我正在处理一些数据,但我得到一个错误,我不知道为什么......
initial <-read.table....
library(Mass)
一切都很好,直到:
glm.percent <- glm.nb(cbind(Count, Rest)~ Plasmid+Region*Plasmid, data=initial)
Error in x[good, , drop = FALSE] : (subscript) logical subscript too long
所以对于更多的背景。我想比较6个组织层中细胞的比例。不,我知道我必须在 R 中使用整数作为负二项式,并且我读到我必须使用 cbind 将我的正计数链接到我的负计数。所以这就是我上面所做的。我之前读到这个错误可能是由于缺少数据点,但一切都很好。有没有人有什么有用的想法?
'data.frame': 54 obs. of 4 variables:
$ Plasmid: Factor w/ 2 levels "CTR","EXP": 2 2 2 2 2 2 2 2 2 2 ...
$ Region : Factor w/ 6 levels "L0","L1","L2+3",..: 2 2 2 2 2 3 3 3 3 3 ...
$ Count : int 0 3 34 12 83 361 426 185 402 565 ...
$ Rest : int 464 592 306 482 791 103 169 155 92 309 ...
干杯!
【问题讨论】: