model.matrix.spmodel | R Documentation |
Extract the model matrix (X) from a fitted model object.
## 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, ...)
object |
A fitted model object from |
... |
Other arguments. Not used (needed for generic consistency). |
The model matrix (of the fixed effects), whose rows represent observations and whose columns represent explanatory variables corresponding to each fixed effect.
stats::model.matrix()
spmod <- splm(z ~ water + tarp,
data = caribou,
spcov_type = "exponential", xcoord = x, ycoord = y
)
model.matrix(spmod)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.