[R] t.test()

Robin Hankin r.hankin at noc.soton.ac.uk
Thu Nov 23 14:11:50 CET 2006


Hi

I have a vector x of length n.   I am interested in x[1]
being different from the other observations (ie x[-1]).

My null hypothesis  is that x[1]
is drawn from a Gaussian distribution of the same
mean as observations x[-1], which are assumed
to be iid Gaussian.   The (unknown) variance
of x[1] is assumed to be the same as the
variance of x[-1].


This should be an unpaired t-test.

But


 > x <- c(23,25,29,27,30,30)
 > t.test(x=x[1] , y=x[-1])
Error in t.test.default(x = x[1], y = x[-1]) :
         not enough 'x' observations
 >



What arguments do I need to send to t.test() to test my null?







--
Robin Hankin
Uncertainty Analyst
National Oceanography Centre, Southampton
European Way, Southampton SO14 3ZH, UK
  tel  023-8059-7743



More information about the R-help mailing list