detect_infinite_estimates {detectseparation}  R Documentation 
Detect Infinite Estimates
Description
Method for glm
that detects infinite components in
the maximum likelihood estimates of generalized linear models
with binomial responses.
Usage
detect_infinite_estimates(
x,
y,
weights = NULL,
start = NULL,
etastart = NULL,
mustart = NULL,
offset = NULL,
family = gaussian(),
control = list(),
intercept = TRUE,
singular.ok = TRUE
)
detectInfiniteEstimates(
x,
y,
weights = NULL,
start = NULL,
etastart = NULL,
mustart = NULL,
offset = NULL,
family = gaussian(),
control = list(),
intercept = TRUE,
singular.ok = TRUE
)
Arguments
x 

y 

weights 
an optional vector of ‘prior weights’ to be used
in the fitting process. Should be 
start 
currently not used. 
etastart 
currently not used. 
mustart 
currently not used. 
offset 
this can be used to specify an a priori known
component to be included in the linear predictor during fitting.
This should be 
family 
a description of the error distribution and link
function to be used in the model. For 
control 
a list of parameters controlling separation
detection. See 
intercept 
logical. Should an intercept be included in the null model? 
singular.ok 
logical. If 
Details
For binomialresponse generalized linear models with "log"
link, separated data allocations do not necessarily lead to
infinite maximum likelihood estimates. For this reason, for models
with the "log"
link
detect_infinite_estimates()
relies on an alternative
linear optimization model developed in Schwendinger et al. (2021),
and for all the other supported links it relies on the linear
programming methods developed in Konis (2007). See
detect_separation()
for definitions and details.
detect_infinite_estimates()
is a wrapper to the
functions separator_ROI()
, separator_lpSolveAPI()
(a
modified version of the separator()
function from the
**safeBinaryRegression** R package), and dielb_ROI()
.
The coefficients()
method extracts a vector of values
for each of the model parameters under the following convention:
0
if the maximum likelihood estimate of the parameter is
finite, and Inf
or Inf
if the maximum likelihood
estimate of the parameter if plus or minus infinity. This
convention makes it easy to adjust the maximum likelihood estimates
to their actual values by elementwise addition.
detect_infinite_estimates()
can be passed directly as
a method to the glm
function. See, examples.
detectInfiniteEstimates
() is an alias for
detect_infinite_estimates
().
Author(s)
Ioannis Kosmidis [aut, cre] ioannis.kosmidis@warwick.ac.uk, Florian Schwendinger [aut] FlorianSchwendinger@gmx.at, Dirk Schumacher [aut] mail@dirkschumacher.net, Kjell Konis [ctb] kjell.konis@me.com
References
Silvapulle, M. J. (1981). On the Existence of Maximum Likelihood Estimators for the Binomial Response Models. Journal of the Royal Statistical Society. Series B (Methodological), 43(3), 310–313. https://www.jstor.org/stable/2984941
Konis K. (2007). *Linear Programming Algorithms for Detecting Separated Data in Binary Logistic Regression Models*. DPhil. University of Oxford. https://ora.ox.ac.uk/objects/uuid:8f9ee0d0d78e41019ab4f9cbceed2a2a
Konis K. (2013). safeBinaryRegression: Safe Binary Regression. R package version 0.13. https://CRAN.Rproject.org/package=safeBinaryRegression
Kosmidis I. and Firth D. (2021). Jeffreysprior penalty, finiteness and shrinkage in binomialresponse generalized linear models. *Biometrika*, **108**, 71–82. doi:10.1093/biomet/asaa052
Schwendinger, F., Grün, B. & Hornik, K. (2021). A comparison of optimization solvers for log binomial regression including conic programming. *Computational Statistics*, **36**, 1721–1754. doi:10.1007/s00180021010845
See Also
glm.fit
and glm
, detect_separation
, check_infinite_estimates
, brglm_fit
Examples
# The classical example given in Silvapulle (1981) can be utilized
# to show that for the LogBinomial model there exist data allocations
# which are separated but produce finite estimates.
data("silvapulle1981", package = "detectseparation")
# Since the data is separated the MLE does not exist for the logit link.
glm(y ~ ghqs, data = silvapulle1981, family = binomial(),
method = "detect_infinite_estimates")
# However, for the log link all components of the MLE are finite.
glm(y ~ ghqs, data = silvapulle1981, family = binomial("log"),
method = "detect_infinite_estimates")
glm(y ~ ghqs, data = silvapulle1981, family = binomial("log"), start = c(1, 0))