============================================================
PART 1: Count PD models
============================================================

Data summary: 30 subjects
  Mean count: 2.30  (expected ~2.42)
  Proportion zeros: 10.0%
  Max count: 6

--- Poisson model ---
  Fitted rate params: [ 1.009 -0.121]
  AIC: 109.61
  Predicted rates at C=[0,1,2,5,10]: [2.744 2.432 2.155 1.5   0.82 ]
  P(count=3) at C=[0,2,5]: ['0.224', '0.198', '0.115']

--- Negative Binomial model (over-dispersed counts) ---
  Fitted rate params: [ 1.203 -0.019]
  Dispersion r: 8.237
  AIC: 133.31
  Poisson AIC: 132.74  (NB AIC should be better for over-dispersed data)

--- Zero-Inflated Poisson model (excess zeros) ---
  Proportion zeros (ZIP data): 56.7%  (expected ~91.9%)
  Fitted rate params: [0.35  0.152]
  AIC: 85.09

============================================================
PART 2: Categorical PD models
============================================================

--- Proportional Odds model ---
  Category distribution: 0=22  1=35  2=23
  Fitted thresholds: [-0.181  1.769]
  Fitted coefficients: [0.336]
  P(cat) at C=0.0: [0.455 0.399 0.146]
  P(cat) at C=2.5: [0.265 0.452 0.283]
  P(cat) at C=5.0: [0.134 0.387 0.478]

--- Discrete-Time Markov model ---
  Fitted transition matrix:
    [0.771 0.229]
    [0.135 0.865]
  True matrix: [[0.7, 0.3], [0.1, 0.9]]

--- Continuous-Time Markov model ---
  Fitted rate matrix Q:
    [-0.209  0.209]
    [ 0.399 -0.399]
  True Q: [[-0.2, 0.2], [0.5, -0.5]]

============================================================
Example 19 complete.

Key takeaways:
  PoissonModel        — count data with log-linear rate
  NegativeBinomialModel — over-dispersed counts
  ZeroInflatedPoisson — mixture of structural zeros + Poisson
  ProportionalOdds    — ordered categorical with covariates
  DiscreteTimeMarkov  — longitudinal state sequences
  ContinuousTimeMarkov — time-continuous state transitions
