I think you might have found a bug (or at least some incomplete code).
I will need to check a reference. The reason is that the bse differ
is that they're taken from the robust covariance matrix; whereas, the
t() method uses the scaled covariance matrix.
> Here's what i'm running:
>
> data = sm.datasets.stackloss.data.load()
> data.exog = sm.add_constant(data.exog)
>
> model = sm.RLM(data.endog, data.exog)
>
> result = model.fit(maxiter=250)
>
> print result.params
> print result.bse
> print result.t()
> print result.params/result.bse
>
>
> Here's the output (with comments added)
> result.params: [ 0.82938433 0.92606597 -0.12784672 -41.02649835]
> result.bse: [ 0.11100521 0.30293016 0.12864961 9.79189854]
> result.t(): [ 12.76825596 5.22418482 -1.69824461 -7.16006021]
> result.params/result.bse: [ 7.47158002 3.05702792 -0.9937591
> -4.18984104]
>
np.sqrt(np.diag(results.bcov_scaled))
array([ 0.11100521, 0.30293016, 0.12864961, 9.79189854])
# bse used for t comes from cov_params
bse = np.sqrt(np.diag(results.cov_params(scale=results.scale)))
results.params/bse
array([ 12.76825596, 5.22418482, -1.69824461, -7.16006021])
> Thanks for much for this excellent package, btw.
Thanks for the feedback.
Skipper
>
> regards
> Dieter
>
>