statsmodels / statsmodels/statsmodels

FAQ: statsmodels for Stata users

Open
#1,718 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

What are some of the equivalent or almost equivalent functions in statsmodels compared to those in Stata, for some of the related estimation and post-estimation options.

Post-Estimation

estat
margins
Testing

Stata after estimation: test, lincom, lrtest, testnl, suest/hausman? contrasts?

  • test joint hypothesis f_test (RM), wald_test (RM),
    individual hypothesis t_test (RM)
  • lincom t_test (RM)
  • lrtest compare_lr_test (RM)
Prediction
  • predict predict (RM)
  • cached attributes: fittedvalues, resid, ...

(RM) = method of results instance

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.

Research direction

Start with the post-estimation topics listed in the issue—estat, margins, hypothesis testing, prediction, and cached result attributes—and verify the corresponding statsmodels result methods. Done means the FAQ documents accurate Stata-to-statsmodels equivalents and clearly notes any gaps or approximate matches.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
analytics, data, documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.