quantileknots: Create knots at sample quantiles

Description Usage Arguments Value Examples

Description

quantileknots creates knots at sample quantiles

Usage

1
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

1
2
3
4
library(ODS)

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

Yinghao-Pan/ODS documentation built on May 10, 2019, 12:07 a.m.