Skip to content

vlt.stats.power.power2sampleDemo

  VLT.STATS.POWER.POWER2SAMPLEDEMO - Demonstrate the vlt.stats.power.power2sample function

    VLT.STATS.POWER.POWER2SAMPLEDEMO()

    Demonstrates the usage of the vlt.stats.power.power2sample function.
    It compares the simulated power from vlt.stats.power.power2sample with the
    theoretical power calculated by MATLAB's 'sampsizepwr' function for a
    two-sample t-test.

    This function can also be called with name/value pairs to alter
    the simulation parameters.

    'numSamples1' (default 20) : number of samples in sample 1
    'numSamples2' (default 20) : number of samples in sample 2
    'sampleStdDev' (default 1) : The standard deviation of the samples.
    'differences' (default [0:0.1:2]) : The differences to test.
    'verbose' (default true) : should we be verbose?

    Example:
      vlt.stats.power.power2sampleDemo();

    Example:
      vlt.stats.power.power2sampleDemo('numSamples1',50,'numSamples2',50);

    Example:
      vlt.stats.power.power2sampleDemo('numSamples1',50,'numSamples2',10,'sampleStdDev',20)

    Example:
      vlt.stats.power.power2sampleDemo('numSamples1',50,'numSamples2',10,'sampleStdDev',20,'differences',[0:1:5])