makeCOVbin | R Documentation |
Discretise numeric value into a categorical variable using the user-defined breaks. If cutoffs and the number of bins (K) is NULL, find the best number of bins using the optK function and find the best cutoff values using the FindBestCut function.
makeCOVbin(X, K, cutoffs, adjust0bin = TRUE, ...)
X |
A numeric vector corresponding to Y. |
K |
Number of bins. |
cutoffs |
A numeric vector of two or more unique cut points. |
adjust0bin |
Adjust bin with 0 observation if TRUE. |
... |
Arguments to be passed to methods. |
The result of binning and the summary of the binning results
Lavielle, M. and Bleakley, K. (2011). Automatic data binning for improved visual diagnosis of pharmacometric models. Journal of pharmacokinetics and pharmacodynamics, 38(6), 861-871.
data(origdata) CUT = FindBestCut(origdata$TIME,8)$cutoffs makeCOVbin(origdata$TIME,K=8,cutoffs=CUT)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.