可以帮我看一下为什么会报错吗?
我想要sva包的combat去除批次效应
代码如下:
1. G24807=as.matrix(GSE24807)
2. rownames(G24807)=G24807[,1]
3. exp=G24807[,2:ncol(G24807)]
4. dimnames=list(rownames(exp),colnames(exp))
5. data=matrix(as.numeric(as.matrix(exp)),nrow = nrow(exp),dimnames = dimnames)
6. batchtype=c(rep(1,9),rep(2,8))
7. modtype=c(rep("HC",2),rep("NASH",7),rep("HC",3),rep("NASH",5))
8. mod=model.matrix(~as.factor(modtype))
9. outtable=ComBat(data,batchtype,mod,par.prior=TRUE)
在输出outtable时就报错了:
outtable=ComBat(data,batchtype,mod,par.prior=TRUE)
Found2batches
Adjusting for1covariate(s) or covariate level(s)
Found1716Missing Data Values
Standardizing Data across genes
Error in solve.default(crossprod(des), crossprod(des, y1)) :
Lapack routine dgesv: system is exactly singular: U[1,1] = 0
请问怎么解决呢