フィルターのクリア

two sided t test

1 回表示 (過去 30 日間)
gsourop
gsourop 2016 年 1 月 24 日
回答済み: Star Strider 2016 年 1 月 24 日
Hi everyone,
I am trying to have a two sided t test and I have prepered the above:
for i=1:N_x+k_x;
results_x(i,3)=mean(tstat_x_star(:,i)>results_x(i,2));
or results_x(i,3)=mean(tstat_x_star(:,i)<results_x(i,2));
disp(i);
end;
but when I run the code I get the message 'Not enough arguments' . What do I miss here? I would really appreciate some help at this point.

回答 (1 件)

Star Strider
Star Strider 2016 年 1 月 24 日
The problem is with this line:
or results_x(i,3)=mean(tstat_x_star(:,i)<results_x(i,2));
The ‘or’ is the problem. You can call the or function as either ‘or(A,B)’ or ‘(A|B)’.
I cannot run your code to test this, but this code will at least not throw that error:
for i=1:N_x+k_x
results_x(i,3) = mean(tstat_x_star(:,i)>results_x(i,2)) | mean(tstat_x_star(:,i)<results_x(i,2));
disp(i);
end

カテゴリ

Help Center および File ExchangeTesting Frameworks についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by