Skip to content

vlt.stats.power.anovaposthocDemo

  VLT.STATS.POWER.ANOVAPOSTHOCDEMO - Demonstrate the vlt.stats.power.anovaposthoc function

    VLT.STATS.POWER.ANOVAPOSTHOCDEMO(...)

    Demonstrates the usage of the vlt.stats.power.anovaposthoc function by creating a sample
    dataset and running a power analysis on it. This function serves as a practical example
    of how to structure the input data and parameters for a power analysis of a multi-factor
    ANOVA design.

    The sample dataset created is a table with columns for Animal, Drug, TestDay, and
    Measurement. This represents a typical repeated-measures design where multiple animals
    are tested with different drugs on different days.

    The demo then calculates the statistical power for detecting differences in the 'Measurement'
    variable based on the 'Drug' and 'TestDay' factors. It explores three different shuffling
    schemes to evaluate power under different assumptions about the data's variance structure.

    Optional Name-Value Pairs:
    - 'numberOfAnimals' (integer > 0): The number of animals (subjects) in the simulation. Default is 5.
    - 'numberOfDrugs' (integer > 0): The number of drug conditions. Default is 2.
    - 'numberOfDays' (integer > 0): The number of test days. Default is 5.
    - 'numShuffles' (integer > 0): Number of simulations for the power analysis. Default is 1000.