intercept_basis {basefun} | R Documentation |
Intercept-Only Basis Function
Description
A simple intercept as basis function
Usage
intercept_basis(ui = c("none", "increasing", "decreasing"), negative = FALSE)
Arguments
ui |
a character describing possible constraints |
negative |
a logical indicating negative basis functions |
Details
intercept_basis
returns a function for the evaluation of
the basis functions with corresponding model.matrix
and predict
methods.
Examples
### set-up basis
ib <- intercept_basis()
### generate data + coefficients
x <- as.data.frame(mkgrid(ib))
### 2 * 1
predict(ib, newdata = x, coef = 2)
[Package basefun version 1.1-4 Index]