Skip to contents

Fits Zou's (2004) modified Poisson regression for binary (incidence) responses: \(\log E[Y_i \mid w_i, x_i] = \beta_0 + \beta_T w_i + x_i^\top \gamma\), fit by maximizing the ordinary Poisson log-likelihood treating the binary \(Y_i\) as if it were Poisson-distributed (a valid estimating equation for the conditional mean regardless of the true outcome distribution, exactly as InferencePropFractionalLogit's quasi-binomial fit is for fractional responses). \(\hat\beta_T\) is a log risk ratio: \(\exp(\hat\beta_T)\) is the estimated treatment relative risk, the same estimand as InferenceIncidLogBinomial's log-binomial model, but modified Poisson never produces a fit failure from the \([0,1]\)-probability constraint that a genuine binomial log-link model can hit. Caveat: this implementation's standard error comes from the ordinary (model-based) Poisson Fisher information (fast_poisson_regression_with_var_cpp's ssq_b_j), not a robust/sandwich correction — Zou's (2004) original proposal specifically pairs the misspecified Poisson working model with a robust sandwich variance estimator to obtain valid standard errors under the resulting overdispersion; users needing the fully robust modified-Poisson variance should treat this class's standard errors/CIs/p-values as approximate. likelihood_tier = "full" metadata is set for component-composition purposes, but private$supports_likelihood_tests() is hard FALSE — only Wald inference is exposed (get_supported_testing_types_impl() returns "wald" only), not likelihood-ratio/score/gradient tests. Fits with implausible coefficients or fitted linear predictors (checked via private$is_modified_poisson_fit_reasonable(), capped by max_abs_reasonable_coef/max_abs_reasonable_linear_predictor) are cached as nonestimable rather than returned.

References

Zou, G. (2004). "A Modified Poisson Regression Approach to Prospective Studies with Binary Data." American Journal of Epidemiology, 159(7), 702-706, doi:10.1093/aje/kwh090 .

See also

InferenceIncidLogBinomial for the genuine log-binomial alternative with the same log-risk-ratio estimand. Comparable Python API: statsmodels discrete models (Poisson family on binary data). See also: Poisson regression (Wikipedia).

Super class

Inference -> InferenceIncidModifiedPoisson

Methods

+ inherited public methods from Inference


InferenceIncidModifiedPoisson$set_custom_randomization_statistic_function()

Usage

InferenceIncidModifiedPoisson$set_custom_randomization_statistic_function(
  custom_randomization_statistic_function
)


InferenceIncidModifiedPoisson$set_custom_randomization_statistic_cpp()

Usage

InferenceIncidModifiedPoisson$set_custom_randomization_statistic_cpp(fn)


InferenceIncidModifiedPoisson$approximate_randomization_distribution_beta_hat_T()

Usage

InferenceIncidModifiedPoisson$approximate_randomization_distribution_beta_hat_T(
  r = 501,
  delta = 0,
  transform_responses = "none",
  show_progress = TRUE,
  permutations = NULL,
  debug = FALSE,
  zero_one_logit_clamp = .Machine$double.eps
)


InferenceIncidModifiedPoisson$supports_rand_pval_for_incidence()

Usage

InferenceIncidModifiedPoisson$supports_rand_pval_for_incidence()


InferenceIncidModifiedPoisson$clone()

The objects of this class are cloneable with this method.

Usage

InferenceIncidModifiedPoisson$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

# \donttest{
seq_des = DesignSeqOneByOneBernoulli$new(n = 10, response_type = 'incidence')
for (i in 1:10) {
  seq_des$add_one_subject_to_experiment_and_assign(data.frame(x1 = rnorm(1)))
}
seq_des$add_all_subject_responses(rbinom(10, 1, 0.5))
inf = InferenceIncidModifiedPoisson$new(seq_des)
inf$compute_estimate()
#> [1] -0.004776953
# }