I resuscitated this old post because there is still something which is not going like it should (IHMO).

$coeff without any extra-parameter between brackets  is supposed to return a matrix, whereas actually, after an ols estimation with only one regressor, it returns a scalar instead of a matrix 1x1. Surprisingly (or not) if I try to access $coeff[1] it gives no error.

Moreover there is another issue connected somehow with $coeff and loops, but  i couldn't  replicate a minimal test-case.  After the first iteration it's like $coeff weren't available anymore and any attempt to access to it produces an error:

"The statistic you requested is not available".

Anyway I'll try to go deeper on this tomorrow, I'm already sleepy..