derive_var_pchg: Derive Percent Change from Baseline

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/derive_var_pchg.R

Description

Derive percent change from baseline (PCHG) in a BDS dataset

Usage

1
derive_var_pchg(dataset)

Arguments

dataset

The input dataset. Required variables are AVAL and BASE.

Details

Percent change from baseline is calculated by dividing change from baseline by the absolute value of the baseline value and multiplying the result by 100.

Value

The input dataset with an additional column named PCHG

Author(s)

Thomas Neitmann

See Also

derive_var_chg()

Examples

1
2
3
4
5
6
7
8
9
advs <- tibble::tribble(
  ~USUBJID, ~PARAMCD, ~AVAL, ~ABLFL, ~BASE,
  "P01",    "WEIGHT", 80,    "Y",    80,
  "P01",    "WEIGHT", 80.8,  "",     80,
  "P01",    "WEIGHT", 81.4,  "",     80,
  "P02",    "WEIGHT", 75.3,  "Y",    75.3,
  "P02",    "WEIGHT", 76,    "",     75.3
)
derive_var_pchg(advs)

epijim/admiral documentation built on Feb. 13, 2022, 12:15 a.m.