default.knots {AdaptFitOS}R 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.


[Package AdaptFitOS version 0.67 Index]