Skip to content

Commit 98ddc32

Browse files
committed
Document drop1.loglm() vs. stats::drop1.glm() in @details
Brief "Comparison with drop1.glm()" subsection summarizing the findings from dev/anova-like/drop1-compare.R: default scopes agree, Df/LR statistic match exactly, and what drop1.loglm() adds (table/array input, Pearson X^2, fitted-model reuse, scope validation against the generating class).
1 parent 6cec2bf commit 98ddc32

2 files changed

Lines changed: 23 additions & 0 deletions

File tree

‎R/drop1.loglm.R‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,17 @@
5050
#' (still implied by `A:C`/`A:D` and `B:C`/`B:D` respectively), so the
5151
#' reduced model stays hierarchical.
5252
#'
53+
#' ## Comparison with `drop1.glm()`
54+
#' A hierarchical `loglm()` model has an equivalent fit via
55+
#' `glm(family = poisson)`, and `stats::drop1.glm()`'s default `scope`
56+
#' already restricts to the same generating-class terms as `object$margin`,
57+
#' so `Df` and the LR statistic agree exactly between the two. `drop1.loglm()`
58+
#' works directly on table/array or `Freq ~ ...` data, adds the Pearson X^2
59+
#' column, and returns the fitted drop-one models for reuse; its `scope`
60+
#' validation also guards against testing a non-generating-class term, which
61+
#' `drop1.glm()` will silently allow with a misleading result. See
62+
#' `dev/anova-like/drop1-compare.R` for a worked comparison.
63+
#'
5364
#' @param object a fitted `MASS::loglm` model
5465
#' @param scope character vector of term labels (colon-separated, as in
5566
#' `"A:B"`) to test; must be a subset of the model's generating class.

‎man/drop1.loglm.Rd‎

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)