Previously, data is discretized into quantiles using num_knots and the default quantile() function. This leads to knot points that are outside observed data points.
I changed it to quantile(type = 1), so that quantiles correspond with observed data points.
This generates knot points that better respects the original data.
Minor change.
Previously, data is discretized into quantiles using num_knots and the default
quantile()
function. This leads to knot points that are outside observed data points.I changed it to
quantile(type = 1)
, so that quantiles correspond with observed data points. This generates knot points that better respects the original data.