vlt.stats.power.anovaposthoc
VLT.STATS.POWER.ANOVAPOSTHOC - Compute statistical power for ANOVA post-hoc tests by simulation
ANOVAPOSTHOC_RESULTS = VLT.STATS.POWER.ANOVAPOSTHOC(DATATABLE, DIFFERENCES, GROUPCOLUMNNAMES, ...
GROUPCOMPARISONS, GROUPSHUFFLES, ...)
Computes the statistical power for ANOVA post-hoc tests by creating simulated datasets and
performing ANOVA statistics with post-hoc tests.
Inputs:
- dataTable: A MATLAB table. The last column is assumed to be the data column.
- differences: A vector of differences to examine. The difference is added to one group being examined.
- groupColumnNames: A cell array of char arrays or a string array of column names that correspond to group labels.
- groupComparisons: An array of group numbers to compare (e.g., [1 2] to compare groups 1 and 2).
- groupShuffles: A cell array of vectors of group numbers to indicate how to shuffle data for surrogate datasets.
Optional Name-Value Pairs:
- 'posthocTest' ('Tukey' | ...): The post-hoc test to use. Default is 'Tukey'.
(Note: 'Tukey' corresponds to 'hsd' in MATLAB's multcompare function).
- 'numShuffles' (integer > 0): Number of simulations. Default is 10000.
- 'alpha' (0 < alpha < 1): The significance level. Default is 0.05.
- 'dataColumnName' (string): Name of the column with the data. Default is the last column name.
Outputs:
- anovaposthoc_results: A structure with one entry per cell array entry in groupShuffles.
Each entry has fields:
- groupComparisonName: String array of the groups being compared.
- groupComparisonPower: The power of the comparisons.