[R] t.test()
Thilo Kellermann
tkellermann at ukaachen.de
Thu Nov 23 15:55:40 CET 2006
Hi,
seems as if you want to test if a single subject is a member of a population
from which you have drawn a sample. This question has been addressed by Payne
& Jones and Crawford and collaborators. You should have a look at their
articles in case that I interpreted your null-hypothesis and data in the
correct way....
Good luck,
Thilo
Payne & Jones (1957, J Clin Psychol 13:115-121)
Crawford, Howell, Garthwaite (1998, J Clin Exp Neurosychol 12:482)
Crawford JR, Garthwaite PH (2005) Evaluation of Criteria for Classical
Dissociations in Single-Case Studies by Monte Carlo Simulation.
Neuropsychology 19(5): 664-678)
On Thursday 23 November 2006 14:48, Peter Dalgaard wrote:
> "ONKELINX, Thierry" <Thierry.ONKELINX at inbo.be> writes:
> > There is no such thing as an unpaired t-test. A t-test can be a paired,
> > one sample or two sample t-test. Since you want to compare the sample
> > against a given mean, you need a one sample t-test. You tried to do a
> > two sample test. That didn't work because you need at least two
> > observations in each group.
>
> NO! This is just plain wrong.
>
> > x <- c(23,25,29,27,30,30)
> > t.test(x[-1], mu = x[1])
> >
> > One Sample t-test
> >
> > data: x[-1]
> > t = 5.3634, df = 4, p-value = 0.005833
> > alternative hypothesis: true mean is not equal to 23
> > 95 percent confidence interval:
> > 25.50814 30.89186
> > sample estimates:
> > mean of x
> > 28.2
> >
> >
> > Cheers,
> >
> > Thierry
> >
> > ------------------------------------------------------------------------
> > ----
> >
> > ir. Thierry Onkelinx
> >
> > Instituut voor natuur- en bosonderzoek / Reseach Institute for Nature
> > and Forest
> >
> > Cel biometrie, methodologie en kwaliteitszorg / Section biometrics,
> > methodology and quality assurance
> >
> > Gaverstraat 4
> >
> > 9500 Geraardsbergen
> >
> > Belgium
> >
> > tel. + 32 54/436 185
> >
> > Thierry.Onkelinx at inbo.be
> >
> > www.inbo.be
> >
> >
> >
> > Do not put your faith in what statistics say until you have carefully
> > considered what they do not say. ~William W. Watt
> >
> > A statistical analysis, properly conducted, is a delicate dissection of
> > uncertainties, a surgery of suppositions. ~M.J.Moroney
> >
> > -----Oorspronkelijk bericht-----
> > Van: r-help-bounces at stat.math.ethz.ch
> > [mailto:r-help-bounces at stat.math.ethz.ch] Namens Robin Hankin
> > Verzonden: donderdag 23 november 2006 14:12
> > Aan: R-help at r-project.org
> > Onderwerp: [R] t.test()
> >
> > 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
> >
> > ______________________________________________
> > R-help at stat.math.ethz.ch 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.
> >
> > ______________________________________________
> > R-help at stat.math.ethz.ch 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.
--
________________________
Thilo Kellermann
Department of Psychiatry und Psychotherapy
RWTH Aachen University
Pauwelstr. 30
52074 Aachen
Tel.: +49 (0)241 / 8089977
Fax.: +49 (0)241 / 8082401
E-Mail: tkellermann at ukaachen.de
More information about the R-help
mailing list