Learn R Programming

NCA (version 5.0.0)

nca_power: Function to evaluate power

Description

Function to evaluate power, test if a sample size is large enough to detect necessity.

Usage

nca_power(n = c(20, 50, 100), effect = 0.10, slope = 1, ceiling = "ce_fdh",
corner = 1, p = 0.05, distribution.x = "uniform", distribution.y = "uniform",
rep = 100, test.rep = 200)

Arguments

n

Number of datapoints to generate, either an integer or a vector of integers.

effect

Effect size of the generated datasets (single value or vector of values).

slope

Slope of the line (single value or vector of values).

ceiling

Ceiling technique to use for this analysis (single value or vector of values).

corner

Integer, indicating the corner to analyze, see nca_analysis.

p

Significance level.

distribution.x

Distribution type(s) for X, "uniform" (default) or "normal" (single value or vector of values).

distribution.y

Distribution type(s) for Y, "uniform" (default) or "normal" (single value or vector of values).

rep

Number of analyses done per iteration.

test.rep

Number of resamples in the statistical approximate permutation test. For test.rep = 0 no statistical test is performed. See nca_analysis for reproducible outputs.

Examples

Run this code
# Simple example
if (FALSE) results <- nca_power()
results <- nca_power(rep=1, test.rep = 1)
print(results)

Run the code above in your browser using DataLab