optK | R Documentation |
This function automatically finds the optimal number of bins using dynamic programming.
optK(X, Kmethod = "cluster", maxK = 10, beta = 0.2, lambda = 0.3, R = 4, C1 = 2.5, C2 = 7.8, ...)
X |
Numeric vector corresponding to Y. |
Kmethod |
The way to calculate the penalty in automatic binning."cluster" or "kernel". |
maxK |
The maximum number of bins. |
beta |
Additional parameter for automatic binning. For more detailed explanation, see reference. |
lambda |
Additional parameter for automatic binning. For more detailed explanation, see reference. |
R |
Additional parameter for automatic binning. For more detailed explanation, see reference. |
C1 |
Additional parameter for automatic binning. For more detailed explanation, see reference. |
C2 |
Additional parameter for automatic binning. For more detailed explanation, see reference. |
... |
Arguments to be passed to methods. |
The optimal number of bins, the result of binning, and the summary of binning including the penalty values up to the maximum number of bins are returned.
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) optK(origdata$TIME)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.