Hello, I have to compute the pooled z-value and I would like to know which way is more appropriate
b <- c( -0.205,1.040,0.087) s <- c(0.449,0.167,0.241) n <- c(310, 342, 348) z <- b/s Z <- sum(z)/sqrt(length(n)) P <- 2*(1-pnorm(abs(Z))) P w <- sqrt(n) Zw <- sum(w * z)/sqrt(sum(w^2)) Pw <- 1 - pchisq(Zw * Zw, 1) Pw Many thanks in advance, Cheba [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.