quantileknots {ODS}R Documentation

Create knots at sample quantiles

Description

quantileknots creates knots at sample quantiles

Usage

quantileknots(x, nknots, boundstab)

Arguments

x

a vector. The knots are at sample quantiles of x.

nknots

number of knots

boundstab

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.

Value

a vector of knots at sample quantiles of x.

Examples

library(ODS)

x <- c(1, 2, 3, 4, 5)
quantileknots(x, 3, 0)

[Package ODS version 0.2.0 Index]