Re: [R] Why two chisq.test p values differ when the contingency

2003-07-16 Thread Peter Dalgaard BSA
Shi, Tao [EMAIL PROTECTED] writes: Hi, Ted: I guess this problem is platform-dependent. I just tied it on a R 1.6.1 runing on Win2K, it gave me two different p values. But when I tried it on R1.7.0 on a Linux Server, I got the similar result as you did. I have filed a bug-report as Peter

[R] Why two chisq.test p values differ when the contingency tableis transposed?

2003-07-15 Thread Tao Shi
I'm using R1.7.0 runing with Win XP. Thanks, ...Tao x [,1] [,2] [1,] 149 151 [2,]18 t(x) [,1] [,2] [1,] 1491 [2,] 1518 chisq.test(x, simulate.p.value=T, B=10) Pearson's Chi-squared test with

RE: [R] Why two chisq.test p values differ when the contingency

2003-07-15 Thread Ted Harding
On 15-Jul-03 Tao Shi wrote: x [,1] [,2] [1,] 149 151 [2,]18 t(x) [,1] [,2] [1,] 1491 [2,] 1518 chisq.test(x, simulate.p.value=T, B=10) Pearson's Chi-squared test with simulated p-value (based on 1e+05 replicates) data: x X-squared = 5.2001, df =

RE: [R] Why two chisq.test p values differ when the contingency

2003-07-15 Thread Shi, Tao
Hi, Ted and Dennis: Thanks for your speedy replies! I don't think this happens just randomly, rather, I'm thinking it may be due to the way chisq.test function handles simulation. Here shows why: (Ted, I think there is an error in your code, tx should be t(x) ) x [,1] [,2] [1,] 149

Re: RE: [R] Why two chisq.test p values differ when the contingency

2003-07-15 Thread Ravi Varadhan
Message - From: Shi, Tao [EMAIL PROTECTED] Date: Tuesday, July 15, 2003 4:37 pm Subject: RE: [R] Why two chisq.test p values differ when the contingency Hi, Ted and Dennis: Thanks for your speedy replies! I don't think this happens just randomly, rather, I'm thinking it may be due

Re: [R] Why two chisq.test p values differ when the contingency

2003-07-15 Thread Peter Dalgaard BSA
Shi, Tao [EMAIL PROTECTED] writes: Hi, Ted and Dennis: Thanks for your speedy replies! I don't think this happens just randomly, rather, I'm thinking it may be due to the way chisq.test function handles simulation. Here shows why: (Ted, I think there is an error in your code, tx should

RE: [R] Why two chisq.test p values differ when the contingency

2003-07-15 Thread Ted Harding
On 15-Jul-03 Shi, Tao wrote: Hi, Ted and Dennis: Thanks for your speedy replies! I don't think this happens just randomly, rather, I'm thinking it may be due to the way chisq.test function handles simulation. Here shows why: (Ted, I think there is an error in your code, tx should be t(x)

RE: [R] Why two chisq.test p values differ when the contingency

2003-07-15 Thread Shi, Tao
Hi, Ted: I guess this problem is platform-dependent. I just tied it on a R 1.6.1 runing on Win2K, it gave me two different p values. But when I tried it on R1.7.0 on a Linux Server, I got the similar result as you did. I have filed a bug-report as Peter suggested. ...Tao [EMAIL