ehsanbehnam / SmartSVA

SmartSVA introduces an improved Surrogate Variable Analysis algorithm that automatically captures salient features from data in the presence of confounding factors. Comparing to the popular SVA algorithm, SmartSVA works 10 times faster.
2 stars 0 forks source link

Warning message: the standard deviation is zero #1

Open Gongmian784 opened 2 months ago

Gongmian784 commented 2 months ago

Hi, When I was running smartSVA using my own data and want to find the hidden confounding of different tissues (mod), the process was broken and threw an ERROR: > sv.obj <- smartsva.cpp(pduis, mod, mod0=NULL, n.sv=n.sv, VERBOSE=T) Iteration (out of 100 ): 1 0 2 NA Error in while (i < B && rho < 1 - epsilon) { : missing value where TRUE/FALSE needed In addition: Warning message: In cor(x = pprob, y = p.prev, use = "pairwise.complete.obs", method = "spearman") : the standard deviation is zero

Is that means the standard deviation of pprob is 0 and how could that happens? Please give some advice to help me avoid this. Thanks in advance!

Mian

Gongmian784 commented 2 months ago

My data frame of tissues was prepared like this:

pred 1 Lung 2 Rumen 3 Large_intestine 4 Small_intestine 5 Rumen

and mod was prepared like this: mod <- model.matrix( ~ pred, tissues)