-
Notifications
You must be signed in to change notification settings - Fork 28
/
preliminaries.py
120 lines (66 loc) · 2.02 KB
/
preliminaries.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# -*- coding: utf-8 -*-
# <nbformat>3.0</nbformat>
# <headingcell level=3>
# Learn More and Get Help
# <markdowncell>
# Documentation: http://statsmodels.sf.net
#
# Mailing List: http://groups.google.com/group/pystatsmodels
#
# Use the source: https://github.com/statsmodels/statsmodels
# <headingcell level=3>
# Tutorial Import Assumptions
# <codecell>
import numpy as np
import statsmodels.api as sm
import matplotlib.pyplot as plt
import pandas
from scipy import stats
np.set_printoptions(precision=4, suppress=True)
pandas.set_printoptions(notebook_repr_html=False,
precision=4,
max_columns=12)
# <headingcell level=3>
# Statsmodels Import Convention
# <codecell>
import statsmodels.api as sm
# <markdowncell>
# Import convention for models for which a formula is available.
# <codecell>
from statsmodels.formula.api import ols, rlm, glm, #etc.
# <headingcell level=3>
# Package Overview
# <markdowncell>
# Regression models in statsmodels.regression
# <markdowncell>
# Discrete choice models in statsmodels.discrete
# <markdowncell>
# Robust linear models in statsmodels.robust
# <markdowncell>
# Generalized linear models in statsmodels.genmod
# <markdowncell>
# Time Series Analysis in statsmodels.tsa
# <markdowncell>
# Nonparametric models in statsmodels.nonparametric
# <markdowncell>
# Plotting functions in statsmodels.graphics
# <markdowncell>
# Input/Output in statsmodels.iolib (Foreign data, ascii, HTML, $\LaTeX$ tables)
# <markdowncell>
# Statistical tests, ANOVA in statsmodels.stats
# <markdowncell>
# Datasets in statsmodels.datasets (See also the new GPL package Rdatasets: https://github.com/vincentarelbundock/Rdatasets)
# <headingcell level=3>
# Base Classes
# <codecell>
from statsmodels.base import model
# <codecell>
help(model.Model)
# <codecell>
help(model.LikelihoodModel)
# <codecell>
help(model.LikelihoodModelResults)
# <codecell>
from statsmodels.regression.linear_model import RegressionResults
# <codecell>
help(RegressionResults)