covariate_time_update: Adds column to a NONMEM data file containing values of a...

Description Usage Arguments Value Note Author(s)

View source: R/covariate_time_update.R

Description

Adds column to a NONMEM data file containing values of a time-varying covariate.

Usage

1
2
3
4
covariate_time_update(data_cov, data_dose, data_final, cov_time = "LBDTC",
  dose_time = "EXSTDTC", ID_col = "SID", cov_column = "LBTESTCD",
  cov_name = "ALB", cov_value = "LBSTRESN", date_format_cov = FALSE,
  date_format_dose = TRUE, time_zone = "US/Eastern")

Arguments

data_cov

data frame containing information about time-varying covariate.

data_dose

data frame containing information about when the dose was administered.

data_final

data frame to which column with time-varying covariate should be added.

cov_time

column name in data_cov containing information about the time when the covariate was measured.

dose_time

column name in data_dose containing information about the time when the dose was administered.

ID_col

name of the ID column in data_final.

cov_column

column name in data_cov containing information about the name of the covariate to be selected. e.g. weight, albumin, bilirubin etc.

cov_name

name of the time-varying covariate.

cov_value

name that describes the value (e.g. "Concentration") of the time-varying covariate.

date_format_cov

logical. change date format from '%Y-%m-%dT%H:%M' to '%Y-%m-%d %H:%M'(if TRUE).

date_format_dose

logical. change date format from '%Y-%m-%dT%H:%M' to '%Y-%m-%d %H:%M'(if TRUE).

time_zone

name of required timezone. Daylight saving change is applied when time difference is calculated.

Value

The input data frame with new column added containing values of time-varying covariate.

Note

The data file containing information about the dose records should be filtered to include only records of interest e.g. related to a specific drug (e.g. BAY and not co-medication).

Time difference between times when the dose was administered and the covariate was measured is calculated in hours.

The ID columns in the original data files containing information about covariate and dose should be called SUBJIDN.

The time column in data_final (containing dosing and concentration times) should be called TIME.

The format of the dates in the cov_time and dose_time columns should be '%Y-%m-%dT%H:%M' or '%Y-%m-%d %H:%M' (it is assumed that clock time is present).

Author(s)

Katarzyna Nurzynska


jgrevel/BAST1-R-Library documentation built on May 21, 2019, 10:11 a.m.