def _bstar_1effect(beta, alpha, yTBy, yTBX, yTBM, XTBX, XTBM, MTBM):
from numpy_sugar import epsilon<EOL>from numpy_sugar.linalg import dotd<EOL>from numpy import sum<EOL>r = full(MTBM[<NUM_LIT:0>].shape[<NUM_LIT:0>], yTBy)<EOL>r -= <NUM_LIT:2> * add.reduce([dot(i, beta) for i in yTBX])<EOL>r -= <NUM_LIT:2> * add.reduce([i * alpha for i in yTBM])<EOL>r += add.reduce([dotd(beta.T, dot(i, beta)) for i in XTBX])<EOL>r += add.reduce([dotd(beta.T, i * alpha) for i in XTBM])<EOL>r += add.reduce([sum(alpha * i * beta, axis=<NUM_LIT:0>) for i in XTBM])<EOL>r += add.reduce([alpha * i.ravel() * alpha for i in MTBM])<EOL>return clip(r, epsilon.tiny, inf)<EOL>
Same as :func:`_bstar_set` but for single-effect.