This question already has an answer here:

Suppose I have a blackbox function that solves simple linear regression. Can I use this function to solve "multiple" linear regression? The blackbox computes the slope and intercept in a simple linear regression model.


marked as duplicate by kjetil b halvorsen, mdewey, Peter Flom regression Sep 9 '17 at 11:48

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.