Skip to content

Commit c367d78

Browse files
authored
Merge pull request statsmodels#5964 from bashtage/rlm-start-params
ENH: Add start_params to RLM
2 parents 9bd3eb5 + 4028cd2 commit c367d78

File tree

3 files changed

+108
-155
lines changed

3 files changed

+108
-155
lines changed

statsmodels/regression/_tools.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,20 @@ def fit(self, method='pinv'):
100100
else:
101101
params, _, _, _ = np.linalg.lstsq(self.wexog, self.wendog,
102102
rcond=-1)
103+
return self.results(params)
103104

105+
def results(self, params):
106+
"""
107+
Construct results
108+
109+
params : array
110+
Model parameters
111+
112+
Notes
113+
-----
114+
Allows results to be constructed from either existing parameters or
115+
when estimated using using ``fit``
116+
"""
104117
fitted_values = self.exog.dot(params)
105118
resid = self.endog - fitted_values
106119
wresid = self.wendog - self.wexog.dot(params)

0 commit comments

Comments
 (0)