View source: R/functions_wrapper.R
bin_observations | R Documentation |
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 | +—————+————————————————-+
bin_observations(model, method, nbins)
model |
(Model) Pharmpy model |
method |
(str) Name of the binning method to use |
nbins |
(numeric) The number of bins wanted |
(data.frame) A series of bin ids indexed on the original record index of the dataset vector A vector of bin edges
## Not run:
model <- load_example_model("pheno")
bins, boundaries <- bin_observations(model, method="equal_width", nbins=10)
bins
boundaries
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.