Just compute the differences and use a
one-sample t-test.
ie.
d = x1-x2;
md=mean(d);
stderr=std(d)/sqrt(length(d));
p=1-tcdf(md/stderr,length(d)-1)
This assumes you have the Stats toolbox
(for tcdf). If you don;t, there's a
spm_tcdf function.
Best wishes,
Will.
Andreas Bartsch wrote:
> Hi all,
> this is more a basic matlab than a SPM-kind of question: Given two dependent
> (paired) measurements of a variable (e.g., x1 & x2 - actually representing a
> global estimator or integral in my case)how do I perform a simple
> paired-test in matlab commands (assessing the hypotheses H0 that x did not
> change from 1 to 2 vs. the alternative H1 that it did)? I have found
> signtest and signrank but I am not sure how to run a paired t-test in
> matlab.
> TIA-
> Andreas
>
> ****************************************************************************
> ******************************
> Dr. Andreas J. Bartsch phone: +49 (0)931-201-0
> Division of Neuroradiology,
> ecr.: -34791
> BJMU Wuerzburg pager:
> #5325
> Josef-Schneider-Str. 11 fax: +49 (0)
> 931-201-34685
> 97080 Wuerzburg email:
> [log in to unmask]
> Germany
> [log in to unmask]
> ****************************************************************************
> ******************************
>
>
>
--
William D. Penny
Wellcome Department of Imaging Neuroscience
University College London
12 Queen Square
London WC1N 3BG
Tel: 020 7833 7478
FAX: 020 7813 1420
Email: [log in to unmask]
URL: http://www.fil.ion.ucl.ac.uk/~wpenny/
|