powered by
quantileknots creates knots at sample quantiles
quantileknots
quantileknots(x, nknots, boundstab)
a vector. The knots are at sample quantiles of x.
number of knots
parameter for boundary stability. The default is 0. If boundstab = 1, then nknots+2 knots are created and the first and last are deleted. This mitigates the extra variability of regression spline estimates near the boundaries.
a vector of knots at sample quantiles of x.
# NOT RUN { library(ODS) x <- c(1, 2, 3, 4, 5) quantileknots(x, 3, 0) # }
Run the code above in your browser using DataLab