tp2: tp2

View source: R/MARGE_package.R

tp2R Documentation

tp2

Description

Truncated p-th power function (negative part).

Usage

tp2(x, t, p = 1)

Arguments

x

: a predictor variable value.

t

: a specified knot value.

p

: the pth degree of the polynomial considered.

Value

tp2 returns a vector of values that have been transformed using a truncated p-th power function (negative part) for a specified knot value.

Author(s)

Jakub Stoklosa and David I. Warton

References

Friedman, J. (1991). Multivariate adaptive regression splines. The Annals of Statistics, 19, 1–67.

Stoklosa, J. and Warton, D.I. (2018). A generalized estimating equation approach to multivariate adaptive regression splines. Journal of Computational and Graphical Statistics, 27, 245–253.

See Also

tp1

Examples

data(leptrine)

dat1 <- leptrine[[1]]
X_pred <- dat1[, 1]    # One predictor used.

tp2(X_pred, 1)       # Knot value set at x = 1.

JakubStats/marge documentation built on Feb. 25, 2024, 9:38 p.m.