model.matrix.slrm | R Documentation |
This function extracts the design matrix of a spatial logistic regression model.
## S3 method for class 'slrm'
model.matrix(object, ..., keepNA=TRUE)
object |
A fitted spatial logistic regression model. An object of class
|
... |
Other arguments (such as |
keepNA |
Logical. Determines whether rows containing |
This command is a method for the generic function
model.matrix
. It extracts the design matrix of a
spatial logistic regression.
The object
must be a fitted
spatial logistic regression
(object of class "slrm"
).
Such objects are produced by the model-fitting
function slrm
.
Usually the result is a matrix with one column for every constructed covariate in the model, and one row for every pixel in the grid used to fit the model.
If object
was fitted using split pixels (by calling
slrm
using the argument splitby
) then the
matrix has one row for every pixel or half-pixel.
A matrix. Columns of the matrix are canonical covariates in the model.
and \rolf
model.matrix
,
model.images
,
slrm
.
fit <- slrm(japanesepines ~x)
head(model.matrix(fit))
# matrix with two columns: '(Intercept)' and 'x'
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.