0

I am trying to get the pval from a bigdata table (700 observations and 6 variables). I can't calculate the p values due to repeated values of some percetanges (100% or 0%)

The table more or less represent my doubt. What can I do to get my p values at least in the rows that do not display repeated values?

b<-cbind(c(100,50,20),c(100,49,19),c(100,48,18),c(100,47,17), c(100,NaN, 16))

pval<-apply(b, 1, function(x) t.test(x[1:2], x[3:4], alternative = "two.sided", var.equal = T))

Error in t.test.default(x[1:2], x[3:4], alternative = "two.sided", var.equal = T) : data are essentially constant

0 Answers0