Nothing
invchisq <-
function(p, k, data = NULL, subset = NULL, na.action = na.fail,
log.p = FALSE) {
if(is.null(data)) data <- sys.frame(sys.parent())
mf <- match.call()
mf$data <- NULL
mf$subset <- NULL
mf$na.action <- NULL
mf[[1]] <- as.name("data.frame")
mf <- eval(mf, data)
if(!is.null(subset)) mf <- mf[subset,]
mf <- na.action(mf)
p <- as.numeric(mf$p)
k <- as.numeric(mf$k)
if(length(k) == 1) {
k <- rep(k, length(p))
} else {
}
keep <- (p > 0) & (p <= 1) & (k > 0)
invalid <- sum(1L * keep) < 2
if(invalid) {
warning("Must have at least two valid p values")
res <- list(chisq = NA_real_, df = NA_integer_,
p = NA_real_, validp = p[keep])
} else {
pvals <- p[keep]
k <- k[keep]
if(length(pvals) != length(p)) {
warning("Some studies omitted")
}
chisq <- qchisq(pvals, k, lower.tail = FALSE)
chi <- sum(chisq)
df <- sum(k)
res <- list(chisq = chi, df = df,
p = pchisq(chi, df, lower.tail = FALSE, log.p = log.p),
validp = pvals)
}
class(res) <- c("invchisq", "metap")
res
}
print.invchisq <- function(x, ...) {
cat("chisq = ", x$chisq, " with df = ", x$df, " p = ", x$p, "\n")
invisible(x)
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.