Learn R Programming

spatstat.core (version 2.3-1)

valid.slrm: Check Whether Spatial Logistic Regression Model is Valid

Description

Determines whether a fitted spatial logistic regression model is a well-defined model.

Usage

# S3 method for slrm
valid(object, warn=TRUE, …)

Arguments

object

Fitted spatial logistic regression model (object of class "slrm").

warn

Logical value indicating whether to issue a warning if the validity of the model cannot be checked (due to unavailability of the required code).

Ignored.

Value

A logical value, or NA.

Details

This is a method for the generic function valid for spatial logistic regression models (class "slrm").

In a model fitted by slrm, some of the fitted coefficients may be NA or infinite values. This can occur if the data are not adequate for estimation of the model parameters. The model is said to be unidentifiable or confounded.

The function valid.slrm checks whether the fitted coefficients of object specify a well-defined model. It returns TRUE if the model is well-defined, and FALSE otherwise.

Use the function emend.slrm to force the fitted model to be valid.

See Also

slrm, emend.slrm

Examples

Run this code
# NOT RUN {
   fit1 <- slrm(cells ~ x)
   valid(fit1)
   fit2 <- slrm(cells ~ x + I(x))
   valid(fit2)
# }

Run the code above in your browser using DataLab