Description Usage Arguments Value Examples
View source: R/rbin-winsorize.R
Bin continuous data using winsorized method.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
data |
A |
response |
Response variable. |
predictor |
Predictor variable. |
bins |
Number of bins. |
include_na |
logical; if |
winsor_rate |
A value from 0.0 to 0.5. |
min_val |
the low border, all values being lower than this will be replaced by this value. The default is set to the 5 percent quantile of predictor. |
max_val |
the high border, all values being larger than this will be replaced by this value. The default is set to the 95 percent quantile of predictor. |
type |
an integer between 1 and 9 selecting one of the nine quantile algorithms detailed in |
remove_na |
logical; if |
x |
An object of class |
print_plot |
logical; if |
... |
further arguments passed to or from other methods. |
A tibble
.
1 2 3 4 5 | bins <- rbin_winsorize(mbank, y, age, 10, winsor_rate = 0.05)
bins
# plot
plot(bins)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.