What is a Linear Model?
A linear model is an equation that describes a relationship between a dependent variable and some independent variables that shows a constant rate of change.
Mathematically, it can be expressed as:
Given a dataset (Yj, Xij) with i = 1 … n and j = 1 … p, a linear model describes the relationship between the dependent variable Y and the independent variables Xi and has the form
Y = a0 + a1 X1 + … + an Xn + εi
where ai are the coefficients to be estimated, and εi represent the error terms.
Linear models are usually solved with square methods, such as Ordinary Least Squares. They are the base of more general models, like generalized linear models (e.g., logit, Poisson, multinomial, etc.), mixed-effects models (random coefficients, hierarchical models), and penalized regression (shrinkage or regularization, e.g., Ridge, Lasso, ElasticNet).
They are often used to approximate non-linear relationships through transformations, and when the amount of data is very significant, they can be estimated via neural networks
Why are Linear Models Powerful?
Linear models have a wide range of uses and have been applied in science and engineering. For example, in economics, they are one of the most fundamental techniques applied in econometrics, where they are used in time series analysis and forecasting.
In engineering, they have been employed in soil property prediction, reaction phenomena, and fluid dynamics, among many other problems.
Linear Models and LogicPlum
LogicPlum’s platform is a modeling tool based on automation, machine learning, and artificial intelligence. As such, linear models are one of the most important modeling tools included.
However, finding the right solution to a modeling problem may imply researching many options. LogicPlum’s platform provides this capacity through automation, which allows for defining and testing hundreds of different options and choosing the most efficient one based on a specified metric.
For those wanting to calculate linear regressions using Python (sklearn library):
For those who prefer R:
- Porras, E. (2018). Linear Regression in R. Available at https://www.datacamp.com/community/tutorials/linear-regression-R