llSplines {causalSLSE} | R Documentation |
Local Linear Splines Generator for Model Objects
Description
It generates a matrix of basis functions using local linear splines. The
number of basis functions and the breaking points are determined by the
knot specifications of the slseModel
or cslseModel
model.
Usage
## S3 method for class 'slseModel'
llSplines(object, ...)
## S3 method for class 'cslseModel'
llSplines(object, ...)
Arguments
object |
A model of class |
... |
Additional arguments to pass to other methods. Currently not used. |
Value
The function returns a matrix of basis functions used to
estimate the semiparametric model. It is used directly as regressor in
lm
as shown in the example below.
Examples
data(simDat3)
## We manually estimate the semiparametric model
mod1 <- slseModel(Y ~ X1 * X2, data = simDat3)
U <- llSplines(mod1)
fit1 <- lm(Y ~ U, data = simDat3)
## We use estSLSE instead (results are identical)
fit2 <- estSLSE(mod1)
[Package causalSLSE version 0.3-1 Index]