"Input and response variables must be set before regression can be calculated!");
}
if (getB() == null) {
// Calculate coefficients.
Matrix xT = getX().transpose();
setB(xT.mult(getX()).solve());
// Save this result for the calculation of the standard error for each
// coefficient.
setStandardErrorMatrix(getB().copy());
setB(getB().mult(xT).mult(getY()));
}