nonlinear predict inference versus conditional moment test (cmt)

Open
#3,913 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
15/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
python
Domain
data, testing

Research direction

Start by reading the notes on predict_nonlinear (#2296), margins, cm_test (#2096), and the chi-square tests (#3904), then consult the cited Cameron and Trivedi reference. Clarify whether predicted probabilities and conditional moment tests share reusable derivatives or require separate variance calculations. Done means defining an implementable scope and testable formulas for the proposed functionality.

Written by the indexing model from the issue text.

Description

comp-base comp-discrete topic-diagnostic topic-predict

(just some notes, that I didn't realize before. I didn't check details of formulas yet, so I'm not sure how much the corresponding code will overlap.)

use case: predicted probabilities for count distributions versus conditional moment test

predicted probabilities for count distributions are a deterministic function of the parameters and exog. We can use delta method or endpoint transformation to get standard errors and confidence intervals.
(predict_nonlinear #2296 and similar to margins)

Testing whether predicted probabilities are compatible with observed probabilities uses a "residual", i.e. moment condition that expected difference between observed indicator function and predicted probability is zero. This is a random variable (endog is random) and not a deterministic function.
Test depends on two components, variance of extra moment condition and of their covariance to score-obs (and implied distribution of params) (using partitioned inverse of full moment conditions).
cm_test #2096, and chisquare tests #3904
Cameron Trivedi count book 2nd ed. p. 194 for predicted probabilities using cm-test (and OPG version with auxiliary regression)

Using derivative of moment condition or predict function overlaps between the two.

Dominant language
Python
Stars
11.6k
Forks
3.6k
Avg merge
7h 37m
Merged PRs (30d)
96

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from statsmodels/statsmodels

All issues in statsmodels/statsmodels

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.