tp1: tp1

View source: R/MARGE_package.R

tp1R Documentation

tp1

Description

Truncated p-th power function (positive part).

Usage

tp1(x, t, p = 1)

Arguments

x

: a vector of predictor variable values.

t

: a specified knot value.

p

: the pth degree of the polynomial considered.

Value

tp1 returns a vector of values that have been transformed using a truncated p-th power function (positive 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

tp2

Examples

data(leptrine)

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

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

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