View source: R/summary.scam.R View source: R/predict.scam.R
| model.matrix.scam | R Documentation |
Obtains the model matrix from a fitted scam object.
## S3 method for class 'scam'
model.matrix(object, ...)
object |
fitted model object of class |
... |
other arguments, passed to |
Calls predict.scam with no newdata argument and
type="lpmatrix" in order to obtain the model matrix of object.
A model matrix.
scam
require(scam)
set.seed(4)
n <- 200
x <- runif(n)*4-1
y <- exp(4*x)/(1+exp(4*x)) +rnorm(n)*.5
m <- scam(y ~ s(x,bs="mpi"))
X <- model.matrix(m)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.