Re: [Rd] same test statistic for t-test with and without equal variance assumption

2004-10-01 Thread Adaikalavan Ramasamy
Apologies, I made an incorrect statement. The statistics from t-test with difference variance assumptions are the same if both groups have the same length. Sorry for troubling everyone again. On Fri, 2004-10-01 at 13:56, Adaikalavan Ramasamy wrote: > Peter, thank you! I forgot the to square root

Re: [Rd] same test statistic for t-test with and without equal variance assumption

2004-10-01 Thread Adaikalavan Ramasamy
Peter, thank you! I forgot the to square root in calculating sp. sp <- sqrt( ( (n1-1)*v1 + (n2-1)*v2 )/(n1 + n2 - 2) ) For several simulation runs, the test statistics from both tests are remarkably similar (difference is less than 10e-16). I naively assumed that the statistics value should be sl

Re: [Rd] same test statistic for t-test with and without equal variance assumption

2004-10-01 Thread Peter Dalgaard
Adaikalavan Ramasamy <[EMAIL PROTECTED]> writes: > Could some kindly tell me if I am supposed to be getting the same test > statistic value with var.equal=TRUE and var.equal=FALSE in t.test ? > > set.seed(1066) > x1 <- rnorm(50) > x2 <- rnorm(50) > > t.test(x1, x2, var.equal=FALSE)$statistic # 0

[Rd] same test statistic for t-test with and without equal variance assumption

2004-10-01 Thread Adaikalavan Ramasamy
Could some kindly tell me if I am supposed to be getting the same test statistic value with var.equal=TRUE and var.equal=FALSE in t.test ? set.seed(1066) x1 <- rnorm(50) x2 <- rnorm(50) t.test(x1, x2, var.equal=FALSE)$statistic # 0.5989774 t.test(x1, x2, var.equal=TRUE)$statistic # 0.5989774 ???