expand_obs: Create Template Data Sets for mrgsolve, Allowing for Varying...

Description Usage Arguments Details Value Author(s)

Description

This function shares many features with expand.ev in the mrgsolve package, but offers additional features.

Usage

1
expand_obs(..., indata, dense, units, duration, sampling.int, sampling.freq)

Arguments

...

passed to expand.grid

indata

input data set

dense

Boolean; if TRUE, sample more intensively around dose times. Otherwise, use consistent intervals only.

units

Character string specifying units in minutes, hours, days, weeks, or years.

duration

Numeric value specifying maximum length of simulations as specified in units.

sampling.int

Numeric value specifying width of sampling interval around dose times in units.

sampling.freq

Numeric value specifying sampling frequency for mrgsim in units

cmt

Numeric value specifying compartment in which to dose; default is 1.

Details

For intensive sampling around dose times, the dense option may be requested. The user has control over the sampling frequency (times per hour), as well as the width of the sampling window (time before/after dosing). expand_obs calls the sample_window function to generate the additional observations before or after dose times. The resulting dataset includes the number of days, as well as the time of day for the observation, as calculated from the start of the simulated

Currently, the function assumes the dose variable is called DOSE, and the time variable is called TIME.

Value

A data frame ordered by subject, and then by time.

Author(s)

Ryan Kyle, ryan.kyle@mail.mcgill.ca


rpkyle/cscmisc documentation built on May 13, 2019, 12:06 p.m.