rndttest

版本 2.0.0.0 (15.3 KB) 作者: Giuseppe Cardillo
An alternative to Student t-test assessing difference in means.
2.7K 次下载
更新时间 2018/4/7

Perform a Randomisation test to assess difference in means.
Permutation or randomisation tests are a useful alternative to more standard parametric tests for analysing experimental data. They have the advantage of making no distributional assumptions (such as Normality) about the data, while remaining as powerful as more standard tests. The t-test assumes that the two groups arose by drawing samples from two Normally distributed populations, and that we are investigating whether these populations differ in their mean. The randomisation test, on the other hand, assumes that some initial set of individuals were randomly allocated to two treatment groups. The number of permutations to be examined soon grows prohibitively large, so, this function uses two approaches: an Exact Method when the possible permutations are less than 20.000 and a Monte Carlo Naive Method when the permutations are more than 20.000.
Syntax: pvalue=rndttest(x,y,delta,alpha)

Inputs: X and Y (mandatory) - data vectors. DELTA and ALPHA (optional)- If Monte Carlo method is used it is necessary to evaluate how many times the process must be reiterated to ensure that p-value is within DELTA units of the true one with (1-ALPHA)*100% confidence. (Default DELTA=ALPHA=0.01).

Output: p-value

Example: X=[10 11 12]; Y=[17 18 19];

Calling on Matlab the function: rndttest(X,Y)

Answer is:

RANDOMISATION TEST
Exact Method
20 randomisations evaluated Probability (p-value) that the observed difference is accidental: 0.1000

This p-value is the best one that can be quoted for these data. It is based only on the assumption that individuals are allocated at random to groups. It does not assume anything about Normality of distributions, which may or may not be true. Even when such assumptions are true, the randomisation test is as powerful as a t-test. (If you are curious, a t-test of the experimental data in our example gives p=0.00102)

Created by Giuseppe Cardillo
giuseppe.cardillo-edta@poste.it

To cite this file, this would be an appropriate format: Cardillo G. (2008) Rndttest: An alternative to Student t-test assessing difference in means.
http://www.mathworks.com/matlabcentral/fileexchange/20928

引用格式

Giuseppe Cardillo (2024). rndttest (https://github.com/dnafinder/rndttest), GitHub. 检索来源 .

MATLAB 版本兼容性
创建方式 R2014b
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Industrial Statistics 的更多信息

Community Treasure Hunt

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

Start Hunting!

无法下载基于 GitHub 默认分支的版本

版本 已发布 发行说明
2.0.0.0

inputparser and github link

1.4.0.0

Changes in description

1.3.0.0

A more efficient computation was used

1.2.0.0

mistakes correction

1.1.0.0

Changes ih help section

1.0.0.0

Improvement in input error handling

要查看或报告此来自 GitHub 的附加功能中的问题,请访问其 GitHub 仓库
要查看或报告此来自 GitHub 的附加功能中的问题,请访问其 GitHub 仓库