define_bins: Define bins for many types of data

View source: R/define_bins.R

define_binsR Documentation

Define bins for many types of data

Description

Define bins for many types of data

Usage

define_bins(obs, sim, bins, n_bins, verbose = FALSE)

define_bins_tte(obs, sim, bins, n_bins, kmmc, verbose = FALSE)

Arguments

obs

a data.frame with observed data, containing the independent and dependent variable, a column indicating the individual, and possibly covariates. E.g. load in from NONMEM using read_table_nm

sim

this is usually a data.frame with observed data, containing the independent and dependent variable, a column indicating the individual, and possibly covariates. E.g. load in from NONMEM using read_table_nm. However it can also be an object like a nlmixr or xpose object

bins

either "density", "time", or "data", "none", or one of the approaches available in classInterval() such as "jenks" (default) or "pretty", or a numeric vector specifying the bin separators.

n_bins

when using the "auto" binning method, what number of bins to aim for

verbose

show debugging information (TRUE or FALSE)

kmmc

either NULL (for regular TTE vpc, default), or a variable name for a KMMC plot (e.g. "WT")

Value

A list with named elements: "bins", the bin separator values; "labeled", are the bins labeled?; "obs", binned observed data; "sim", binned simulated data. Additionally, "tmp_bins" is added for tte data.

Functions

  • define_bins_tte(): Define bins for time-to-event data


ronkeizer/vpc documentation built on May 11, 2023, 11:09 p.m.