View source: R/effective_functions.r
tpb | R Documentation |
Makes truncated power basis spline functions.
tpb(x, degree = 3, nknots = 3, knot_loc = NULL)
x |
Vector of values that will be transformed by the basis functions. |
degree |
Degree of the polynomial used by the basis function. |
nknots |
Number of knots to use in the spline. |
knot_loc |
Location of the knots. If |
A n x degree
+nknots
matrix of basis
function values.
library(psre)
data(wvs)
smod3 <- lm(secpay ~ tpb(gini_disp, degree=3, knot_loc=.35) + democrat, data=wvs)
summary(smod3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.