Script for t-test

조회 수: 6 (최근 30일)
Olivia
Olivia 2013년 12월 5일
댓글: Olivia 2013년 12월 7일
Does anyone know a script that can load an excel data file and perform a t-test.
Thanks :)

답변 (1개)

Wayne King
Wayne King 2013년 12월 5일
If you have the Statistics Toolbox, use ttest or ttest2. So you should say whether you have the Statistics Toolbox and then whether your excel file contains data for a one-sample, paired, or two-sample t-test.
  댓글 수: 2
Olivia
Olivia 2013년 12월 6일
Thank you for your reply!
Yes I do have the Statistics Toolbox and the excel file contains data for a one-sample t-test. In the file there is data from 21 participants and for each of these participants there are two conditions which have 230 trials each.
Any advice of what script would work would be greatly appreciated. I have attached the excel file
Thanks again.
Olivia
Olivia 2013년 12월 7일
Sorry I confused myself a bit there; I think it is a paired sample because although I only have one sample I have two conditions. This is what I have so far:
[NUMERIC,TXT,RAW]=xlsread(EEG.data); % Open data file in Matlab
% I think somehow I need to index the 2 conditions (all of the target times and distractor times) so I can put them into the t-test (I haven't successfully managed this yet).
X=Targets Y=Distractors
[H,P] = ttest(X,Y)

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Data Import from MATLAB에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by