Re: [R] t-test problem

2010-06-17 Thread Worik R
Ted this was very helpful. To be crystal clear I'll rephrase you. What I am interested in is the probability that my 'T' is in the tail. For a two sided test I do not care which tail. Since (all things being equal) the distribution of T is around 0 if the my T is greater than 0 I compare it to

Re: [R] t-test problem

2010-06-17 Thread Ted Harding
On 16-Jun-10 22:30:39, Worik R wrote: > I have two pairs of related vectors > x1,y1 > and > x2,y2 > > I wish to do a test for differences in means of x1 and y1, > ditto x2 and y2. > > I am getting odd results. I am not sure I am using 'pt' properly... > I have not included the raw vectors a

Re: [R] t-test problem

2010-06-17 Thread Oscar Rueda
Hi Worik, You can try 2*pt(abs(t1$statistic), t1$parameter, lower.tail=FALSE) If the test is two sided. Cheers, Oscar Oscar M. Rueda, PhD Postdoc, Breast Cancer Functional Genomics Cancer Research UK Cambridge Research Institute Li Ka Shing Centre Robinson Way Cambridge CB2 0RE England O

Re: [R] t-test problem

2010-06-17 Thread David Winsemius
On Jun 17, 2010, at 12:51 AM, Worik R wrote: If it were not for the fact that I get inconsistent results I would be sure that I need... I have not yet seen a proper challenge to your original assumption that the t-statistic should be the same as the p-value. They go in _opposite_ direct

Re: [R] t-test problem

2010-06-17 Thread Worik R
> Sorry, I realized that is is fairly easy to test that it is an issue > with which tail of the distribution you use. This should show what is > going on better than my prior message. > > 1.353946/2 = 0.676973 > 1 - 0.676973 = 0.323027 > 0.323027 * 2 = 0.646054 > > in pt(), the default is lower.ta

Re: [R] t-test problem

2010-06-16 Thread Joshua Wiley
On Wed, Jun 16, 2010 at 3:30 PM, Worik R wrote: > I have two pairs of related vectors > x1,y1 > > and > > x2,y2 > > I wish to do a test for differences in means of x1 and y1, ditto x2 and y2. > > I am getting odd results.  I am not sure I am using 'pt' properly... > > I have not included the raw v

Re: [R] t-test problem

2010-06-16 Thread Joshua Wiley
Look what happens when you use lower.tail=FALSE (see ?pt ). If that is not your problem, perhaps you can provide a short sample vector that replicates your results? Josh On Wed, Jun 16, 2010 at 10:02 PM, Worik R wrote: > More: > > When the t-stat is > 0 should I use 'pt' differently? > > I have

Re: [R] t-test problem

2010-06-16 Thread Worik R
More: When the t-stat is > 0 should I use 'pt' differently? I have been checking my results and (except for the example I posted) all the inconsistencies occur when t>0 Worik On Thu, Jun 17, 2010 at 10:30 AM, Worik R wrote: > I have two pairs of related vectors > x1,y1 > > and > > x2,y2 > > I

Re: [R] t-test problem

2010-06-16 Thread Worik R
If it were not for the fact that I get inconsistent results I would be sure that I need... 2*pt(stat, df) Section 8.1 of R-intro.pdf is explicit. Problem is it gives inconsistent results Worik On Thu, Jun 17, 2010 at 10:30 AM, Worik R wrote: > I have two pairs of related vectors > x1,y1 > >