plot_diagnostics#
- SuperLSS.plot_diagnostics(
- X: object | EagerFrame,
- y: NDArray,
- *,
- engine: str = 'matplotlib',
- n_sim: int = 100,
- max_points: int = 50000,
- seed: int = 42,
- sample_weight: NDArray | None = None,
- offsets: Mapping[str, NDArray] | None = None,
- truncation: tuple[object, object] | None = None,
- censored: ArrayLike | None = None,
Draw the six-panel distributional diagnostic.
Q-Q with a simulated envelope, the worm plot, the PIT histogram, the residual density against the standard normal, the residuals against the first parameter’s linear predictor and their standard deviation in bins of the second’s: the first three ask whether the family is right, the last three where it is wrong.
sample_weightis read asresidual_set()reads it: a prior weight is inside each row’s law and the row counts at most once, a frequency weight replicates the row, and above 100,000 occurrences the panels read a subset of 100,000 drawn without replacement.engineselects matplotlib or plotly, and only the engine asked for is imported.truncationandcensoredare the bounds the model was fitted with, read as infit(); pass them for rows recorded under them.