50% off | Unlimited Data & AI Learning

Last chance! 50% off unlimited learning

Sale ends in


pharmr (version 1.0.1)

bin_observations: bin_observations

Description

Bin all observations on the independent variable

Available binning methods:

+---------------+-------------------------------------------------+ | Method | Description | +===============+=================================================+ | equal_width | Bins with equal width based on the idv | +---------------+-------------------------------------------------+ | equal_number | Bins containing an equal number of observations | +---------------+-------------------------------------------------+

Usage

bin_observations(model, method, nbins)

Value

(data.frame) A series of bin ids indexed on the original record index of the dataset vector A vector of bin edges

Arguments

model

(Model) Pharmpy model

method

(str) Name of the binning method to use

nbins

(numeric) The number of bins wanted