model.matrix.spmodel {spmodel} | R Documentation |
Extract the model matrix from a fitted model object
Description
Extract the model matrix (X) from a fitted model object.
Usage
## S3 method for class 'splm'
model.matrix(object, ...)
## S3 method for class 'spautor'
model.matrix(object, ...)
## S3 method for class 'spglm'
model.matrix(object, ...)
## S3 method for class 'spgautor'
model.matrix(object, ...)
Arguments
object |
A fitted model object from |
... |
Other arguments. Not used (needed for generic consistency). |
Value
The model matrix (of the fixed effects), whose rows represent observations and whose columns represent explanatory variables corresponding to each fixed effect.
See Also
Examples
spmod <- splm(z ~ water + tarp,
data = caribou,
spcov_type = "exponential", xcoord = x, ycoord = y
)
model.matrix(spmod)
[Package spmodel version 0.7.0 Index]