View source: R/MARGE_package.R
tp2 | R Documentation |
Truncated p-th power function (negative part).
tp2(x, t, p = 1)
x |
: a predictor variable value. |
t |
: a specified knot value. |
p |
: the pth degree of the polynomial considered. |
tp2
returns a vector of values that have been transformed using a truncated p-th power function (negative part) for a specified knot value.
Jakub Stoklosa and David I. Warton
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.
tp1
data(leptrine)
dat1 <- leptrine[[1]]
X_pred <- dat1[, 1] # One predictor used.
tp2(X_pred, 1) # Knot value set at x = 1.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.