Last data update: 2014.03.03

R: Compute default knots for a given x vector
default.knotsR Documentation

Compute default knots for a given x vector

Description

Computes default knots for a given x vector.

Usage

default.knots(x, num.knots, knotchoice="quantiles")

Arguments

x

The covariate. Note that for B-splines, only the range of x is considered.

num.knots

The number of knots. Defaults to floor(n/max(4, floor(n/35)) - 1).

knotchoice

Either "equidistant" or "quantiles" for equidistant and quantile based knots, respectively. Note that in case of B-splines, knots are always equidistant.

Results