powered by
A simple intercept as basis function
intercept_basis(ui = c("none", "increasing", "decreasing"), negative = FALSE)
a character describing possible constraints
a logical indicating negative basis functions
intercept_basis returns a function for the evaluation of the basis functions with corresponding model.matrix and predict methods.
intercept_basis
model.matrix
predict
### set-up basis ib <- intercept_basis() ### generate data + coefficients x <- as.data.frame(mkgrid(ib)) ### 2 * 1 predict(ib, newdata = x, coef = 2)
Run the code above in your browser using DataLab