Exported source
import numpy as np
import pandas as pdEach function extracts a particular statistic from the results object.
These functions must be consistent across the different statistical packages supported by estout.
For example, if we write functions to extract the F-statistic from the linearmodels and statsmodels packages, these functions must have the same name in the linearmodels_results and statsmodels_results modules. They must also have the same return type.
The names of these functions will be the keys of the dictionary returned by the collect_stats function in the core module.
Set up an example dataset and run a few regressions to showcase the functions in this module.
ynames (res)
xnames (res)
params (res)
tstats (res)
pvalues (res)
covmat (res)
| cons | x | z | |
|---|---|---|---|
| cons | 0.000019 | -0.000652 | 0.000580 |
| x | -0.000652 | 0.080867 | -0.075700 |
| z | 0.000580 | -0.075700 | 0.070931 |
se (res)
nobs (res)
r2 (res)