nca_powerplot: Function to show the powerplot

nca_powerplotR Documentation

Function to show the powerplot

Description

Function to show the powerplot, optional over various variables.

Usage

nca_powerplot(df_power, x.variable = 'n', x.name = 'Sample size',
            x.min = 0, x.max = NULL,
            line.variable = 'ES', line.name = 'Effect size')

Arguments

df_power

Dataframe as returned by the nca_power function.

x.variable

The variable to use for the X scale, default is sample size.

x.name

The name for the X scale.

x.min

The minimum value for the X scale, defaults to 0.

x.max

The maximum value for the X scale, defaults to the maximum X.

line.variable

Variable that represented the line.

line.name

The name of the variable that represented the line.

Examples

# Simple example, showing a normal plot with the power as a function of the sample size
# A line for each effect size will be shown
## Not run: results <- nca_power(effect = c(.1, .2, .3))

nca_powerplot(results)

# This example shows the power for different ceiling lines
## Not run: results <- nca_power(ceiling = c("ce_fdh", "cr_fdh"))

powerplot <- nca_powerplot(results, line.variable='ceiling', line.name='Ceiling')

NCA documentation built on March 20, 2026, 5:08 p.m.