emend.slrm | R Documentation |
Ensures that a fitted spatial logistic regression specifies a well-defined model.
## S3 method for class 'slrm' emend(object, ..., fatal=FALSE, trace=FALSE)
object |
Fitted point process model (object of class |
... |
Ignored. |
fatal |
Logical value indicating whether to generate an error if the model cannot be projected to a valid model. |
trace |
Logical value indicating whether to print a trace of the decision process. |
emend.slrm
is a method for the generic emend
,
The purpose of the function is to ensure that a fitted model is valid.
The model-fitting function slrm
fits spatial logistic regression models to point pattern data.
In some circumstances, the fitted model returned by slrm
may not
specify a well-defined model, because
some of the fitted coefficients of the model
may be NA
or infinite values.
This usually occurs when the data are insufficient to estimate
all the parameters. The model is said to be
unidentifiable or confounded.
The function emend.slrm
modifies the model object
so that the model is valid. It
identifies the terms in the model object
that are associated with illegal parameter values (i.e. parameter
values which are either NA
, infinite, or outside their permitted
range). It considers all possible sub-models of object
obtained by deleting one or more
of these terms. It identifies which of these submodels are valid,
and chooses the valid submodel with the largest pseudolikelihood. The result
of emend.slrm
or project.slrm
is the
true maximum pseudolikelihood fit to the data.
For large datasets or complex models, the algorithm used in
emend.slrm
may be time-consuming, because it takes time to
compute all the sub-models. A faster, approximate
algorithm can be applied by setting
spatstat.options(project.fast=TRUE)
. This produces a
valid submodel, which may not be the maximum likelihood submodel.
Use the function valid.slrm
to check whether a fitted model
object specifies a well-defined model.
Another point process model (object of class "slrm"
).
.
slrm
,
valid.slrm
,
emend
,
spatstat.options
fit <- slrm(redwood ~ x + I(x)) coef(fit) fit2 <- emend(fit) coef(fit2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.