RSDT_power {singcar}R Documentation

Power calculator for RSDT

Description

Calculates approximate power, given sample size, using Monte Carlo simulation, for specified case scores, means and standard deviations for the control sample. The means and standard deviations defaults to 0 and 1 respectively, so if no other values are given the case scores are interpreted as deviations from the mean in standard deviations. Hence, the effect size of the dissociation (Z-DCC) would in that case be the difference between the two case scores.

Usage

RSDT_power(
  case_a,
  case_b,
  mean_a = 0,
  mean_b = 0,
  sd_a = 1,
  sd_b = 1,
  r_ab = 0.5,
  sample_size,
  alternative = c("two.sided", "greater", "less"),
  alpha = 0.05,
  nsim = 10000
)

Arguments

case_a

A single value from the expected case observation on task A.

case_b

A single value from the expected case observation on task B.

mean_a

The expected mean from the control sample on task A. Defaults to 0.

mean_b

The expected mean from the control sample on task B. Defaults to 0.

sd_a

The expected standard deviation from the control sample on task A. Defaults to 1.

sd_b

The expected standard deviation from the control sample on task B. Defaults to 1.

r_ab

The expected correlation between the tasks. Defaults to 0.5

sample_size

The size of the control sample, vary this parameter to see how the sample size affects power.

alternative

The alternative hypothesis. A string of either "two.sided" (default) or "one.sided".

alpha

The specified Type I error rate. This can also be varied, with effects on power. Defaults to 0.05.

nsim

The number of simulations to run. Higher number gives better accuracy, but low numbers such as 10000 or even 1000 are usually sufficient for the purposes of this calculator.

Value

Returns a single value approximating the power of the test for the given parameters.

Examples

RSDT_power(case_a = -3, case_b = -1, mean_a = 0, mean_b = 0,
           sd_a = 1, sd_b = 1, r_ab = 0.5, sample_size = 20, nsim = 1000)

[Package singcar version 0.1.5 Index]