gen_wcc: Within-cycle correction (WCC)

View source: R/within_cycle_corrections.R

gen_wccR Documentation

Within-cycle correction (WCC)

Description

gen_wcc generates a vector of within-cycle corrections (WCC).

Usage

gen_wcc(n_cycles, method = c("Simpson1/3", "half-cycle", "none"))

Arguments

n_cycles

number of cycles

method

The method to be used for within-cycle correction.

Details

The default method is an implementation of Simpson's 1/3rd rule that generates a vector with the first and last entry with 1/3 and the odd and even entries with 4/3 and 2/3, respectively.

Method "half-cycle" is the half-cycle correction method that generates a vector with the first and last entry with 1/2 and the rest equal to 1.

Method "none" does not implement any within-cycle correction and generates a vector with ones.

Value

A vector of length n_cycles + 1 with within-cycle corrections

References

  1. Elbasha EH, Chhatwal J. Myths and misconceptions of within-cycle correction: a guide for modelers and decision makers. Pharmacoeconomics. 2016;34(1):13-22.

  2. Elbasha EH, Chhatwal J. Theoretical foundations and practical applications of within-cycle correction methods. Med Decis Mak. 2016;36(1):115-131.

Examples

# Number of cycles
n_cycles <- 10
gen_wcc(n_cycles = n_cycles, method = "Simpson1/3")
gen_wcc(n_cycles = n_cycles, method = "half-cycle")
gen_wcc(n_cycles = n_cycles, method = "none")


DARTH-git/darthtools documentation built on April 3, 2025, 2:12 p.m.