ncp_power: Find the approximate non-centrality parameter and power of a...

View source: R/ncp_power.R

ncp_powerR Documentation

Find the approximate non-centrality parameter and power of a modestWLRT.

Description

ncp_power returns the approximate non-centrality parameter and power of a modestWLRT for a range of possible values of t*.

Usage

ncp_power(t_star = NULL, rho = NULL, gamma = NULL, model,
  recruitment, dco, length_t, alpha_one_sided = 0.025)

Arguments

{t_star}

A vector. A range of possible values for t*.

{rho}

rho parameter in a Fleming-Harrington test. Default is NULL. Only used if F-H test used instead of MWLRT.

{gamma}

gamma parameter in a Fleming-Harrington test. Default is NULL. Only used if F-H test used instead of MWLRT.

{model}

A piecewise constant hazard model. A list containing the change_points; the rates lambdas_0 on the control arm; and the rates lambdas_1 on the treatment arm.

{recruitment}

List of recruitment information. Containing

  1. Sample size on control, n_0

  2. Sample size on treatment, n_1

  3. Recruitment period, r_period

  4. Recruitment parameter for power model, k

{dco}

Time of data cut-off.

{length_t}

Number of cutpoints to use when approximating the distribution of the MWLRT-statistic. Default is 18. Can be increased for greater accuracy.

{alpha_one_sided}

One-sided alpha level.

Value

A list containing

  1. non-centrality parameter corresponding to each t* ncp

  2. power corresponding to each t* power


dominicmagirr/gsdelayed documentation built on May 15, 2024, 8:24 a.m.