Skip to content

Commit

Permalink
solved NaN problems in allotest
Browse files Browse the repository at this point in the history
  • Loading branch information
sestelo committed Oct 30, 2017
1 parent 6db42d4 commit bd283cf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions R/allotest.R
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,9 @@ allotest <- function(formula, data, na.action = "na.omit",

res <- list()

for (i in etiquetas) {
yy <- data[, 1][f == i]
xx <- data[, 2][f == i]
for (j in etiquetas) {
yy <- data[, 1][f == j]
xx <- data[, 2][f == j]
yy[yy <= 0] <- 0.0001
xx[xx <= 0] <- 0.0001
n <- length(xx)
Expand Down Expand Up @@ -236,7 +236,7 @@ allotest <- function(formula, data, na.action = "na.omit",
pvalue <- mean(tboot>t)


res[[i]] <- list(statistic = c(t), pvalue = c(pvalue))
res[[j]] <- list(statistic = c(t), pvalue = c(pvalue))

}

Expand Down

0 comments on commit bd283cf

Please sign in to comment.