An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/r-help/attachments/20050602/f21768a1/attachment.pl
how to rectify t.test( ) error
2 messages · Jagarlamudi, Choudary, Peter Dalgaard
"Jagarlamudi, Choudary" <choudary.jagar at swosu.edu> writes:
Hi All,
I get the following error when i perform a t.test.
studentt<-apply(tlr, 1, function(x) t.test(x[2:6], x[7:11],var.equal=TRUE)$p.value)
# tlr is a table of 11 columns and 22500 rows. I am not able to post tlr due to its size.
Error in if (stderr < 10 * .Machine$double.eps * max(abs(mx), abs(my))) stop("data are essentially constant") :
missing value where TRUE/FALSE needed
In addition: Warning messages:
1: argument is not numeric or logical: returning NA in: mean.default(x)
2: argument is not numeric or logical: returning NA in: mean.default(y)
Could someone kindly give me pointers regarding the error. This worked fine with 2 other data sets.
I would conjecture that your table is nonnumeric. What is mode(tlr)? (-- or mode(as.matrix(tlr)) if tlr is a data frame).
O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907