Result types

Returned objects store estimates, uncertainty and diagnostics. Prediction methods depend on the fitted model.

CoxBootstrapResult dataclass

Marginal Cox curve coefficients and fixed-cut row-bootstrap uncertainty.

CoxSurvivalCurves dataclass

Four read-only curve tables named as in R qgcomp 2.19.6.

Population tables have time and surv columns. By-level tables also have a one-based q column, ordered by intervention level and then time. levels stores the actual joint exposure scores.

QuantizedSimulation dataclass

Bases: Mapping[str, ndarray]

Read-only named columns and known coefficients from a simulated sample.

The object is a mapping, so it can be passed directly as data to the package's named-formula fitters. Call to_dict for editable copies.

TidyResult dataclass

Read-only columns for the intercept and joint exposure contrast.

GlanceResult dataclass

Read-only, one-row summary of a fitted conditional model.

Missing numerical measures have value None. The row contains only model information; it does not repeat the fitting call or input names.

MultinomialBootstrapResult dataclass

Category-specific marginal log odds slopes and bootstrap uncertainty.

ZeroInflatedNegativeBinomialResult dataclass

Bases: ZeroInflatedPoissonResult

Conditional NB2 count and structural-zero component effects.

ZeroInflatedPoissonBootstrapResult dataclass

Marginal count and structural-zero slopes with bootstrap uncertainty.

ZeroInflatedNegativeBinomialBootstrapResult dataclass

Bases: ZeroInflatedPoissonBootstrapResult

Marginal NB count and structural-zero slopes with bootstrap intervals.

HurdleNegativeBinomialResult dataclass

Bases: HurdlePoissonResult

Conditional hurdle effects with an estimated NB2 count dispersion.

HurdlePoissonBootstrapResult dataclass

Marginal positive-count and nonzero slopes with bootstrap uncertainty.

HurdleNegativeBinomialBootstrapResult dataclass

Bases: HurdlePoissonBootstrapResult

Marginal positive-count and nonzero slopes with bootstrap intervals.

QGCompResult dataclass

Additive Gaussian fit and descriptive mixture summaries.

Coefficients are ordered as intercept, exposures, then covariates. Covariance uses full-model residual degrees of freedom. For reference compatibility, ci uses normal critical values while p_value uses a Student t law with n - 1 - number_of_exposures degrees of freedom. Therefore the interval need not invert the reported test.

Weights are separate within-sign proportions, not selection probabilities or causal importance. Numerical-zero residual variation gives zero SE and a point interval, but NaN test statistic/p-value and an explicit inference_degenerate diagnostic. No inferential claim is then made.

BinomialResult dataclass

Conditional additive Bernoulli-logit fit and joint log-odds effect.

BinomialRiskRatioResult dataclass

Standardized risks and fixed-cut row-bootstrap log risk ratio.

BinomialOddsRatioResult dataclass

Standardized risks and fixed-cut bootstrap marginal odds ratio.

PoissonResult dataclass

Conditional additive Poisson-log fit and joint log-rate effect.

PoissonBootstrapResult dataclass

Marginal joint log mean ratio and bootstrap uncertainty.

GaussianBootstrapResult dataclass

Saved marginal joint contrast and row-bootstrap uncertainty.

QuadraticGaussianBootstrapResult dataclass

Joint response as a quadratic curve in the common exposure score.

QuadraticGaussianEEResult dataclass

Polynomial joint-response coefficients with cluster-robust uncertainty.

GaussianEEResult dataclass

Additive joint mean difference with cluster-robust uncertainty.

PoissonEEResult dataclass

Marginal log mean ratio with cluster-robust uncertainty.

BinomialEEResult dataclass

Marginal binary ratio with cluster-robust uncertainty.

CoxResult dataclass

Conditional joint Cox log hazard ratio and fitted survival curves.

TobitResult dataclass

Censored Gaussian fit; joint effect on the latent mean scale.

MultinomialResult dataclass

Conditional category-vs-reference joint log odds effects.

ZeroInflatedPoissonResult dataclass

Count log-mean and structural-zero log-odds joint effects.

HurdlePoissonResult dataclass

Truncated-count log parameter and nonzero log-odds joint effects.

QuantizationResult dataclass

Scores and the immutable fitted transformation.

breaks includes outer endpoints and is None in prequantized mode. category_counts describes fitted bins, or the number of observed distinct training scores when no category domain was supplied. Prediction keeps these counts; diagnostics separately report new observed counts. transform does not recompute cuts. Labeled inputs must retain their labels and column order; unlabeled training arrays use positional columns.

QGCompWarning

Bases: RuntimeWarning

A fit or prediction has a limitation recorded in its diagnostics.

DataSplit dataclass

Disjoint, zero-based training and validation rows and their data.

GaussianPartialResult dataclass

Training-selected exposure groups and held-out Gaussian fits.

GLMPartialResult dataclass

Training-selected groups and held-out binary or count model fits.

PointwiseBoundResult dataclass

Read-only R-named columns for one chosen joint-score reference level.

pointwiseref is one-based, as in R. quantile values in table are zero-based joint exposure scores. linpred follows the convention of its producing function: conditional for non-bootstrap fits and marginal for bootstrap fits.

ModelBoundResult dataclass

Read-only columns named as in R modelbound.boot.

Quantile is the zero-based joint score. Linpred is the fitted marginal curve on the link scale. With pwonly=True, simultaneous columns contain missing values because no simultaneous set was requested.

Common Gaussian result methods

summary(*, digits=6)

Return a plain-text summary of this saved Gaussian fit.

Parameters:
  • digits (int, default: 6 ) –

    Significant digits for estimates, uncertainty and sign weights. Must be between 1 and 17, inclusive; booleans are not accepted. Scientific notation preserves small nonzero values.

Returns:
  • str –

    Model size, joint effect and inference, descriptive sign weights, coefficient estimates, and explanations of recorded diagnostics. Use print(result.summary()) to display the text. This method does not print, refit, change the result or test model assumptions.

Raises:
  • ValueError –

    If digits is not an integer from 1 through 17.

Notes

Full-precision values remain in the result attributes. The interval uses normal critical values; the p-value uses the stored R-reference degrees of freedom. Sign weights are descriptive, not uncertainty estimates. Undefined test statistics and p-values appear as NA. Column names are quoted with control characters escaped. The text is intended for readers, not as a machine-readable serialization format.

predict(exposures, covariates=None)

Predict conditional means; report exposure extrapolation by warning.

This method returns neither individual-outcome intervals nor causal intervention values. Supplied labeled columns must retain fit order.

transform(exposures)

Return scores and diagnostics using the fitted exposure map.