| fastglm_diagnostics | R Documentation |
Reports whether the iteration converged, which coefficients can be estimated separately, and whether fitted parameters are close to a boundary. The score is the derivative of the log likelihood with respect to the coefficients; a large value after accounting for predictor scale can indicate incomplete convergence. Covariance conditioning describes how strongly nearly redundant coefficient effects can amplify numerical error. For bias-reduced fits the ordinary score need not vanish. The stored adjusted coefficient and dispersion scores instead assess the equations used to fit the model at the reported estimates.
fastglm_diagnostics(object, boundary = FALSE, max.rows = 5L)
object |
a fitted fastglm GLM or ordinal model. |
boundary |
for ordinal models, also locate the positive-frequency rows with the smallest category probabilities and cumulative-predictor gaps. This reads the retained observations or makes one additional source pass. The default uses only stored ordinal diagnostics. |
max.rows |
maximum number of row/category combinations to retain in
each boundary table when |
A fastglm_diagnostics list with a compact printed summary.
Existing components remain accessible with $ or [[ at full precision.
as.data.frame() returns one row, with list columns for coefficient scores,
category labels, and other nonscalar details. score omits division by the
dispersion, and standardized.score uses the correspondingly unscaled
information diagonal, retaining the ordinary GLM score convention. For a
bias-reduced fit, adjusted.score contains the adjusted likelihood scores,
including dispersion scaling, and standardized.adjusted.score is the
largest absolute adjusted score divided by the square root of its expected
information diagonal. adjusted.dispersion.score and
standardized.dispersion.score describe the dispersion equation; they are
missing for families whose dispersion is fixed. convergence.reason
records the solver's stopping reason when available. Ordinary scores require
retained data or a readable source. Stored adjusted scores remain available
after data are omitted. With inference = "none", adjusted scores are
retained only when the existing constant-information calculation supplies
the required leverages, including prepared Gamma-log fits. Other compact
fits and older objects without stored adjusted scores report them as
unavailable rather than computing an additional covariance matrix.
QR source fits also report their remaining predictor change, joint
information-scaled score per positive-weight row, and dispersion checks.
For binomial probit and complementary log-log bias reduction,
step.reductions counts scoring updates reduced to limit their largest
fitted linear-predictor change to one. A reduced step alone cannot establish
convergence. These safeguards do not guarantee convergence for every design.
For these bias-reduced binomial fits, scores and information use stable
probability-tail calculations; rounded fitted probabilities are not used
to reconstruct the estimating equations.
Ordinal diagnostics report scores in the effective category model after
any empty interior categories have been collapsed; their standardized
score is calculated in the centered/scaled fitting coordinates.
raw.score.maximum is the largest absolute score in the effective model's
reported predictor units. Its magnitude therefore depends on predictor
scaling. With boundary=TRUE, boundary.details identifies the smallest
fitted probabilities and gaps, their row and category labels, observed
frequencies, offsets, and original predictor values. A displayed zero
probability can be numerical underflow; its log probability remains
informative. These observations help diagnose a fit but do not prove
that an interior solution is absent. Source rows and values must remain
unchanged since fitting. Unavailable row diagnostics retain a reason.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.