Sunteți pe pagina 1din 53

Linear regression

In statistics, linear regression is a linear approach to modeling the relationship between a scalar

response (or dependent variable) and one or more explanatory variables (or independent

variables). The case of one explanatory variable is called simple linear regression. For more

than one explanatory variable, the process is called multiple linear regression.[1] This term is

distinct from multivariate linear regression, where multiple correlated dependent variables are

predicted, rather than a single scalar variable.[2]

In linear regression, the relationships are modeled using linear predictor functions whose

unknown model parameters are estimated from the data. Such models are called linear

models.[3] Most commonly, the conditional mean of the response given the values of the

explanatory variables (or predictors) is assumed to be an affine function of those values; less

commonly, the conditional median or some other quantile is used. Like all forms of regression

analysis, linear regression focuses on the conditional probability distribution of the response

given the values of the predictors, rather than on the joint probability distribution of all of these

variables, which is the domain of multivariate analysis.

Linear regression was the first type of regression analysis to be studied rigorously, and to be

used extensively in practical applications.[4] This is because models which depend linearly on

their unknown parameters are easier to fit than models which are non-linearly related to their

parameters and because the statistical properties of the resulting estimators are easier to

determine.

Linear regression has many practical uses. Most applications fall into one of the following two

broad categories:
If the goal is prediction, or forecasting, or error reduction,[clarification needed] linear

regression can be used to fit a predictive model to an observed data set of values of the response

and explanatory variables. After developing such a model, if additional values of the

explanatory variables are collected without an accompanying response value, the fitted model

can be used to make a prediction of the response.

If the goal is to explain variation in the response variable that can be attributed to variation in

the explanatory variables, linear regression analysis can be applied to quantify the strength of

the relationship between the response and the explanatory variables, and in particular to

determine whether some explanatory variables may have no linear relationship with the

response at all, or to identify which subsets of explanatory variables may contain redundant

information about the response.

Linear regression models are often fitted using the least squares approach, but they may also

be fitted in other ways, such as by minimizing the "lack of fit" in some other norm (as with

least absolute deviations regression), or by minimizing a penalized version of the least squares

cost function as in ridge regression (L2-norm penalty) and lasso (L1-norm penalty).

Conversely, the least squares approach can be used to fit models that are not linear models.

Thus, although the terms "least squares" and "linear model" are closely linked, they are not

synonymous.

Contents

1 Introduction

1.1 Assumptions

1.2 Interpretation
2 Extensions

2.1 Simple and multiple linear regression

2.2 General linear models

2.3 Heteroscedastic models

2.4 Generalized linear models

2.5 Hierarchical linear models

2.6 Errors-in-variables

2.7 Others

3 Estimation methods

3.1 Least-squares estimation and related techniques

3.2 Maximum-likelihood estimation and related techniques

3.3 Other estimation techniques

4 Applications

4.1 Trend line

4.2 Epidemiology

4.3 Finance

4.4 Economics

4.5 Environmental science

4.6 Machine learning

5 History

6 See also

7 References

7.1 Citations

7.2 Sources

8 Further reading
9 External links

Introduction

In linear regression, the observations (red) are assumed to be the result of random deviations

(green) from an underlying relationship (blue) between a dependent variable (y) and an

independent variable (x).

Given a data set {\displaystyle \{y_{i},\,x_{i1},\ldots

,x_{ip}\}_{i=1}^{n}}\{y_{i},\,x_{i1},\ldots ,x_{ip}\}_{i=1}^{n} of n statistical units, a

linear regression model assumes that the relationship between the dependent variable y and the

p-vector of regressors x is linear. This relationship is modeled through a disturbance term or

error variable ε — an unobserved random variable that adds "noise" to the linear relationship

between the dependent variable and regressors. Thus the model takes the form

{\displaystyle y_{i}=\beta _{0}+\beta _{1}x_{i1}+\cdots +\beta _{p}x_{ip}+\varepsilon

_{i}=\mathbf {x} _{i}^{\mathsf {T}}{\boldsymbol {\beta }}+\varepsilon _{i},\qquad

i=1,\ldots ,n,}{\displaystyle y_{i}=\beta _{0}+\beta _{1}x_{i1}+\cdots +\beta

_{p}x_{ip}+\varepsilon _{i}=\mathbf {x} _{i}^{\mathsf {T}}{\boldsymbol {\beta

}}+\varepsilon _{i},\qquad i=1,\ldots ,n,}

where T denotes the transpose, so that xiTβ is the inner product between vectors xi and β.

Often these n equations are stacked together and written in matrix notation as

{\displaystyle \mathbf {y} =X{\boldsymbol {\beta }}+{\boldsymbol {\varepsilon

}},\,}{\displaystyle \mathbf {y} =X{\boldsymbol {\beta }}+{\boldsymbol {\varepsilon }},\,}

where
{\displaystyle \mathbf {y} ={\begin{pmatrix}y_{1}\\y_{2}\\\vdots

\\y_{n}\end{pmatrix}},\quad }\mathbf {y} ={\begin{pmatrix}y_{1}\\y_{2}\\\vdots

\\y_{n}\end{pmatrix}},\quad

{\displaystyle X={\begin{pmatrix}\mathbf {x} _{1}^{\mathsf {T}}\\\mathbf {x}

_{2}^{\mathsf {T}}\\\vdots \\\mathbf {x} _{n}^{\mathsf

{T}}\end{pmatrix}}={\begin{pmatrix}1&x_{11}&\cdots &x_{1p}\\1&x_{21}&\cdots

&x_{2p}\\\vdots &\vdots &\ddots &\vdots \\1&x_{n1}&\cdots

&x_{np}\end{pmatrix}},}{\displaystyle X={\begin{pmatrix}\mathbf {x} _{1}^{\mathsf

{T}}\\\mathbf {x} _{2}^{\mathsf {T}}\\\vdots \\\mathbf {x} _{n}^{\mathsf

{T}}\end{pmatrix}}={\begin{pmatrix}1&x_{11}&\cdots &x_{1p}\\1&x_{21}&\cdots

&x_{2p}\\\vdots &\vdots &\ddots &\vdots \\1&x_{n1}&\cdots &x_{np}\end{pmatrix}},}

{\displaystyle {\boldsymbol {\beta }}={\begin{pmatrix}\beta _{0}\\\beta _{1}\\\beta

_{2}\\\vdots \\\beta _{p}\end{pmatrix}},\quad {\boldsymbol {\varepsilon

}}={\begin{pmatrix}\varepsilon _{1}\\\varepsilon _{2}\\\vdots \\\varepsilon

_{n}\end{pmatrix}}.}{\displaystyle {\boldsymbol {\beta }}={\begin{pmatrix}\beta

_{0}\\\beta _{1}\\\beta _{2}\\\vdots \\\beta _{p}\end{pmatrix}},\quad {\boldsymbol

{\varepsilon }}={\begin{pmatrix}\varepsilon _{1}\\\varepsilon _{2}\\\vdots \\\varepsilon

_{n}\end{pmatrix}}.}

Some remarks on notation and terminology:

{\displaystyle \mathbf {y} }\mathbf {y} is a vector of observed values {\displaystyle y_{i}\

(i=1,\ldots ,n)}{\displaystyle y_{i}\ (i=1,\ldots ,n)} of the variable called the regressand,

endogenous variable, response variable, measured variable, criterion variable, or dependent

variable. This variable is also sometimes known as the predicted variable, but this should not
be confused with predicted values, which are denoted {\displaystyle {\hat {y}}}{\hat {y}}.

The decision as to which variable in a data set is modeled as the dependent variable and which

are modeled as the independent variables may be based on a presumption that the value of one

of the variables is caused by, or directly influenced by the other variables. Alternatively, there

may be an operational reason to model one of the variables in terms of the others, in which

case there need be no presumption of causality.

{\displaystyle X}X may be seen as a matrix of row-vectors {\displaystyle \mathbf {x}

_{i}}\mathbf {x} _{i} or of n-dimensional column-vectors {\displaystyle X_{j}}X_{j}, which

are known as regressors, exogenous variables, explanatory variables, covariates, input

variables, predictor variables, or independent variables (not to be confused with the concept of

independent random variables). The matrix {\displaystyle X}X is sometimes called the design

matrix.

Usually a constant is included as one of the regressors. In particular, {\displaystyle \mathbf {x}

_{i0}=1}{\displaystyle \mathbf {x} _{i0}=1} for {\displaystyle i=1,\ldots ,n}i=1,\ldots ,n. The

corresponding element of β is called the intercept. Many statistical inference procedures for

linear models require an intercept to be present, so it is often included even if theoretical

considerations suggest that its value should be zero.

Sometimes one of the regressors can be a non-linear function of another regressor or of the

data, as in polynomial regression and segmented regression. The model remains linear as long

as it is linear in the parameter vector β.

The values xij may be viewed as either observed values of random variables Xj or as fixed

values chosen prior to observing the dependent variable. Both interpretations may be

appropriate in different cases, and they generally lead to the same estimation procedures;

however different approaches to asymptotic analysis are used in these two situations.
{\displaystyle {\boldsymbol {\beta }}}{\boldsymbol {\beta }} is a {\displaystyle (p+1)}(p+1)-

dimensional parameter vector, where {\displaystyle \beta _{0}}\beta _{0} is the intercept term

(if one is included in the model—otherwise {\displaystyle {\boldsymbol {\beta

}}}{\boldsymbol {\beta }} is p-dimensional). Its elements are known as effects or regression

coefficients (although the latter term is sometimes reserved for the estimated effects). Statistical

estimation and inference in linear regression focuses on β. The elements of this parameter

vector are interpreted as the partial derivatives of the dependent variable with respect to the

various independent variables.

{\displaystyle {\boldsymbol {\varepsilon }}}{\displaystyle {\boldsymbol {\varepsilon }}} is

a vector of values {\displaystyle \varepsilon _{i}}\varepsilon _{i}. This part of the model is

called the error term, disturbance term, or sometimes noise (in contrast with the "signal"

provided by the rest of the model). This variable captures all other factors which influence the

dependent variable y other than the regressors x. The relationship between the error term and

the regressors, for example their correlation, is a crucial consideration in formulating a linear

regression model, as it will determine the appropriate estimation method.

Example. Consider a situation where a small ball is being tossed up in the air and then we

measure its heights of ascent hi at various moments in time ti. Physics tells us that, ignoring

the drag, the relationship can be modeled as

{\displaystyle h_{i}=\beta _{1}t_{i}+\beta _{2}t_{i}^{2}+\varepsilon _{i},}h_{i}=\beta

_{1}t_{i}+\beta _{2}t_{i}^{2}+\varepsilon _{i},

where β1 determines the initial velocity of the ball, β2 is proportional to the standard gravity,

and εi is due to measurement errors. Linear regression can be used to estimate the values of β1

and β2 from the measured data. This model is non-linear in the time variable, but it is linear in
the parameters β1 and β2; if we take regressors xi = (xi1, xi2) = (ti, ti2), the model takes on

the standard form

{\displaystyle h_{i}=\mathbf {x} _{i}^{\mathsf {T}}{\boldsymbol {\beta }}+\varepsilon

_{i}.}{\displaystyle h_{i}=\mathbf {x} _{i}^{\mathsf {T}}{\boldsymbol {\beta

}}+\varepsilon _{i}.}

Assumptions

See also: Ordinary least squares § Assumptions

Standard linear regression models with standard estimation techniques make a number of

assumptions about the predictor variables, the response variables and their relationship.

Numerous extensions have been developed that allow each of these assumptions to be relaxed

(i.e. reduced to a weaker form), and in some cases eliminated entirely. Generally these

extensions make the estimation procedure more complex and time-consuming, and may also

require more data in order to produce an equally precise model.

Example of a cubic polynomial regression, which is a type of linear regression.

The following are the major assumptions made by standard linear regression models with

standard estimation techniques (e.g. ordinary least squares):

Weak exogeneity. This essentially means that the predictor variables x can be treated as fixed

values, rather than random variables. This means, for example, that the predictor variables are

assumed to be error-free—that is, not contaminated with measurement errors. Although this

assumption is not realistic in many settings, dropping it leads to significantly more difficult

errors-in-variables models.
Linearity. This means that the mean of the response variable is a linear combination of the

parameters (regression coefficients) and the predictor variables. Note that this assumption is

much less restrictive than it may at first seem. Because the predictor variables are treated as

fixed values (see above), linearity is really only a restriction on the parameters. The predictor

variables themselves can be arbitrarily transformed, and in fact multiple copies of the same

underlying predictor variable can be added, each one transformed differently. This technique

is used, for example, in polynomial regression, which uses linear regression to fit the response

variable as an arbitrary polynomial function (up to a given rank) of a predictor variable. This

makes linear regression an extremely powerful inference method. In fact, models such as

polynomial regression are often "too powerful", in that they tend to overfit the data. As a result,

some kind of regularization must typically be used to prevent unreasonable solutions coming

out of the estimation process. Common examples are ridge regression and lasso regression.

Bayesian linear regression can also be used, which by its nature is more or less immune to the

problem of overfitting. (In fact, ridge regression and lasso regression can both be viewed as

special cases of Bayesian linear regression, with particular types of prior distributions placed

on the regression coefficients.)

Constant variance (a.k.a. homoscedasticity). This means that different values of the response

variable have the same variance in their errors, regardless of the values of the predictor

variables. In practice this assumption is invalid (i.e. the errors are heteroscedastic) if the

response variable can vary over a wide scale. In order to check for heterogeneous error

variance, or when a pattern of residuals violates model assumptions of homoscedasticity (error

is equally variable around the 'best-fitting line' for all points of x), it is prudent to look for a

"fanning effect" between residual error and predicted values. This is to say there will be a

systematic change in the absolute or squared residuals when plotted against the predictive

variables. Errors will not be evenly distributed across the regression line. Heteroscedasticity
will result in the averaging over of distinguishable variances around the points to get a single

variance that is inaccurately representing all the variances of the line. In effect, residuals appear

clustered and spread apart on their predicted plots for larger and smaller values for points along

the linear regression line, and the mean squared error for the model will be wrong. Typically,

for example, a response variable whose mean is large will have a greater variance than one

whose mean is small. For example, a given person whose income is predicted to be $100,000

may easily have an actual income of $80,000 or $120,000 (a standard deviation of around

$20,000), while another person with a predicted income of $10,000 is unlikely to have the same

$20,000 standard deviation, which would imply their actual income would vary anywhere

between -$10,000 and $30,000. (In fact, as this shows, in many cases—often the same cases

where the assumption of normally distributed errors fails—the variance or standard deviation

should be predicted to be proportional to the mean, rather than constant.) Simple linear

regression estimation methods give less precise parameter estimates and misleading inferential

quantities such as standard errors when substantial heteroscedasticity is present. However,

various estimation techniques (e.g. weighted least squares and heteroscedasticity-consistent

standard errors) can handle heteroscedasticity in a quite general way. Bayesian linear regression

techniques can also be used when the variance is assumed to be a function of the mean. It is

also possible in some cases to fix the problem by applying a transformation to the response

variable (e.g. fit the logarithm of the response variable using a linear regression model, which

implies that the response variable has a log-normal distribution rather than a normal

distribution).

Independence of errors. This assumes that the errors of the response variables are uncorrelated

with each other. (Actual statistical independence is a stronger condition than mere lack of

correlation and is often not needed, although it can be exploited if it is known to hold.) Some

methods (e.g. generalized least squares) are capable of handling correlated errors, although
they typically require significantly more data unless some sort of regularization is used to bias

the model towards assuming uncorrelated errors. Bayesian linear regression is a general way

of handling this issue.

Lack of perfect multicollinearity in the predictors. For standard least squares estimation

methods, the design matrix X must have full column rank p; otherwise, we have a condition

known as perfect multicollinearity in the predictor variables. This can be triggered by having

two or more perfectly correlated predictor variables (e.g. if the same predictor variable is

mistakenly given twice, either without transforming one of the copies or by transforming one

of the copies linearly). It can also happen if there is too little data available compared to the

number of parameters to be estimated (e.g. fewer data points than regression coefficients). In

the case of perfect multicollinearity, the parameter vector β will be non-identifiable—it has no

unique solution. At most we will be able to identify some of the parameters, i.e. narrow down

its value to some linear subspace of Rp. See partial least squares regression. Methods for fitting

linear models with multicollinearity have been developed;[5][6][7][8] some require additional

assumptions such as "effect sparsity"—that a large fraction of the effects are exactly zero.

Note that the more computationally expensive iterated algorithms for parameter estimation,

such as those used in generalized linear models, do not suffer from this problem.

Beyond these assumptions, several other statistical properties of the data strongly influence the

performance of different estimation methods:

The statistical relationship between the error terms and the regressors plays an important role

in determining whether an estimation procedure has desirable sampling properties such as

being unbiased and consistent.

The arrangement, or probability distribution of the predictor variables x has a major influence

on the precision of estimates of β. Sampling and design of experiments are highly developed
subfields of statistics that provide guidance for collecting data in such a way to achieve a

precise estimate of β.

Interpretation

The data sets in the Anscombe's quartet are designed to have approximately the same linear

regression line (as well as nearly identical means, standard deviations, and correlations) but are

graphically very different. This illustrates the pitfalls of relying solely on a fitted model to

understand the relationship between variables.

A fitted linear regression model can be used to identify the relationship between a single

predictor variable xj and the response variable y when all the other predictor variables in the

model are "held fixed". Specifically, the interpretation of βj is the expected change in y for a

one-unit change in xj when the other covariates are held fixed—that is, the expected value of

the partial derivative of y with respect to xj. This is sometimes called the unique effect of xj on

y. In contrast, the marginal effect of xj on y can be assessed using a correlation coefficient or

simple linear regression model relating only xj to y; this effect is the total derivative of y with

respect to xj.

Care must be taken when interpreting regression results, as some of the regressors may not

allow for marginal changes (such as dummy variables, or the intercept term), while others

cannot be held fixed (recall the example from the introduction: it would be impossible to "hold

ti fixed" and at the same time change the value of ti2).

It is possible that the unique effect can be nearly zero even when the marginal effect is large.

This may imply that some other covariate captures all the information in xj, so that once that

variable is in the model, there is no contribution of xj to the variation in y. Conversely, the


unique effect of xj can be large while its marginal effect is nearly zero. This would happen if

the other covariates explained a great deal of the variation of y, but they mainly explain

variation in a way that is complementary to what is captured by xj. In this case, including the

other variables in the model reduces the part of the variability of y that is unrelated to xj, thereby

strengthening the apparent relationship with xj.

The meaning of the expression "held fixed" may depend on how the values of the predictor

variables arise. If the experimenter directly sets the values of the predictor variables according

to a study design, the comparisons of interest may literally correspond to comparisons among

units whose predictor variables have been "held fixed" by the experimenter. Alternatively, the

expression "held fixed" can refer to a selection that takes place in the context of data analysis.

In this case, we "hold a variable fixed" by restricting our attention to the subsets of the data

that happen to have a common value for the given predictor variable. This is the only

interpretation of "held fixed" that can be used in an observational study.

The notion of a "unique effect" is appealing when studying a complex system where multiple

interrelated components influence the response variable. In some cases, it can literally be

interpreted as the causal effect of an intervention that is linked to the value of a predictor

variable. However, it has been argued that in many cases multiple regression analysis fails to

clarify the relationships between the predictor variables and the response variable when the

predictors are correlated with each other and are not assigned following a study design.[9]

Commonality analysis may be helpful in disentangling the shared and unique impacts of

correlated independent variables.[10]

Extensions
Numerous extensions of linear regression have been developed, which allow some or all of the

assumptions underlying the basic model to be relaxed.

Simple and multiple linear regression

Example of simple linear regression, which has one independent variable

The very simplest case of a single scalar predictor variable x and a single scalar response

variable y is known as simple linear regression. The extension to multiple and/or vector-valued

predictor variables (denoted with a capital X) is known as multiple linear regression, also

known as multivariable linear regression. Nearly all real-world regression models involve

multiple predictors, and basic descriptions of linear regression are often phrased in terms of the

multiple regression model. Note, however, that in these cases the response variable y is still a

scalar. Another term, multivariate linear regression, refers to cases where y is a vector, i.e., the

same as general linear regression.

General linear models

The general linear model considers the situation when the response variable is not a scalar (for

each observation) but a vector, yi. Conditional linearity of {\displaystyle E(\mathbf {y} \mid

\mathbf {x} _{i})=\mathbf {x} _{i}^{\mathsf {T}}B}{\displaystyle E(\mathbf {y} \mid

\mathbf {x} _{i})=\mathbf {x} _{i}^{\mathsf {T}}B} is still assumed, with a matrix B

replacing the vector β of the classical linear regression model. Multivariate analogues of

ordinary least squares (OLS) and generalized least squares (GLS) have been developed.

"General linear models" are also called "multivariate linear models". These are not the same as

multivariable linear models (also called "multiple linear models").


Heteroscedastic models

Various models have been created that allow for heteroscedasticity, i.e. the errors for different

response variables may have different variances. For example, weighted least squares is a

method for estimating linear regression models when the response variables may have different

error variances, possibly with correlated errors. (See also Weighted linear least squares, and

Generalized least squares.) Heteroscedasticity-consistent standard errors is an improved

method for use with uncorrelated but potentially heteroscedastic errors.

Generalized linear models

Generalized linear models (GLMs) are a framework for modeling response variables that are

bounded or discrete. This is used, for example:

when modeling positive quantities (e.g. prices or populations) that vary over a large scale—

which are better described using a skewed distribution such as the log-normal distribution or

Poisson distribution (although GLMs are not used for log-normal data, instead the response

variable is simply transformed using the logarithm function);

when modeling categorical data, such as the choice of a given candidate in an election (which

is better described using a Bernoulli distribution/binomial distribution for binary choices, or a

categorical distribution/multinomial distribution for multi-way choices), where there are a

fixed number of choices that cannot be meaningfully ordered;

when modeling ordinal data, e.g. ratings on a scale from 0 to 5, where the different outcomes

can be ordered but where the quantity itself may not have any absolute meaning (e.g. a rating

of 4 may not be "twice as good" in any objective sense as a rating of 2, but simply indicates

that it is better than 2 or 3 but not as good as 5).


Generalized linear models allow for an arbitrary link function, g, that relates the mean of the

response variable(s) to the predictors: {\displaystyle E(Y)=g^{-1}(XB)}{\displaystyle

E(Y)=g^{-1}(XB)}. The link function is often related to the distribution of the response, and

in particular it typically has the effect of transforming between the {\displaystyle (-\infty ,\infty

)}(-\infty ,\infty ) range of the linear predictor and the range of the response variable.

Some common examples of GLMs are:

Poisson regression for count data.

Logistic regression and probit regression for binary data.

Multinomial logistic regression and multinomial probit regression for categorical data.

Ordered logit and ordered probit regression for ordinal data.

Single index models[clarification needed] allow some degree of nonlinearity in the relationship

between x and y, while preserving the central role of the linear predictor β′x as in the classical

linear regression model. Under certain conditions, simply applying OLS to data from a single-

index model will consistently estimate β up to a proportionality constant.[11]

Hierarchical linear models

Hierarchical linear models (or multilevel regression) organizes the data into a hierarchy of

regressions, for example where A is regressed on B, and B is regressed on C. It is often used

where the variables of interest have a natural hierarchical structure such as in educational

statistics, where students are nested in classrooms, classrooms are nested in schools, and

schools are nested in some administrative grouping, such as a school district. The response

variable might be a measure of student achievement such as a test score, and different

covariates would be collected at the classroom, school, and school district levels.
Errors-in-variables

Errors-in-variables models (or "measurement error models") extend the traditional linear

regression model to allow the predictor variables X to be observed with error. This error causes

standard estimators of β to become biased. Generally, the form of bias is an attenuation,

meaning that the effects are biased toward zero.

Others

In Dempster–Shafer theory, or a linear belief function in particular, a linear regression model

may be represented as a partially swept matrix, which can be combined with similar matrices

representing observations and other assumed normal distributions and state equations. The

combination of swept or unswept matrices provides an alternative method for estimating linear

regression models.

Estimation methods

A large number of procedures have been developed for parameter estimation and inference in

linear regression. These methods differ in computational simplicity of algorithms, presence of

a closed-form solution, robustness with respect to heavy-tailed distributions, and theoretical

assumptions needed to validate desirable statistical properties such as consistency and

asymptotic efficiency.

Some of the more common estimation techniques for linear regression are summarized below.

Least-squares estimation and related techniques


Francis Galton's 1875 illustration of the correlation between the heights of adults and their

parents. The observation that adult children's heights tended to deviate less from the mean

height than their parents suggested the concept of "regression toward the mean", giving

regression its name. The "locus of horizontal tangential points" passing through the leftmost

and rightmost points on the ellipse (which is a level curve of the bivariate normal distribution

estimated from the data) is the OLS estimate of the regression of parents' heights on children's

heights, while the "locus of vertical tangential points" is the OLS estimate of the regression of

children's heights on parent's heights. The major axis of the ellipse is the TLS estimate.

Main article: Linear least squares

Linear least squares methods include mainly:

Ordinary least squares

Weighted least squares

Generalized least squares

Maximum-likelihood estimation and related techniques

Maximum likelihood estimation can be performed when the distribution of the error terms is

known to belong to a certain parametric family ƒθ of probability distributions.[12] When fθ is

a normal distribution with zero mean and variance θ, the resulting estimate is identical to the

OLS estimate. GLS estimates are maximum likelihood estimates when ε follows a multivariate

normal distribution with a known covariance matrix.

Ridge regression[13][14][15] and other forms of penalized estimation, such as Lasso

regression,[5] deliberately introduce bias into the estimation of β in order to reduce the

variability of the estimate. The resulting estimates generally have lower mean squared error

than the OLS estimates, particularly when multicollinearity is present or when overfitting is a

problem. They are generally used when the goal is to predict the value of the response variable
y for values of the predictors x that have not yet been observed. These methods are not as

commonly used when the goal is inference, since it is difficult to account for the bias.

Least absolute deviation (LAD) regression is a robust estimation technique in that it is less

sensitive to the presence of outliers than OLS (but is less efficient than OLS when no outliers

are present). It is equivalent to maximum likelihood estimation under a Laplace distribution

model for ε.[16]

Adaptive estimation. If we assume that error terms are independent of the regressors,

{\displaystyle \varepsilon _{i}\perp \mathbf {x} _{i}}\varepsilon _{i}\perp \mathbf {x} _{i},

then the optimal estimator is the 2-step MLE, where the first step is used to non-parametrically

estimate the distribution of the error term.[17]

Other estimation techniques

Comparison of the Theil–Sen estimator (black) and simple linear regression (blue) for a set of

points with outliers.

Bayesian linear regression applies the framework of Bayesian statistics to linear regression.

(See also Bayesian multivariate linear regression.) In particular, the regression coefficients β

are assumed to be random variables with a specified prior distribution. The prior distribution

can bias the solutions for the regression coefficients, in a way similar to (but more general than)

ridge regression or lasso regression. In addition, the Bayesian estimation process produces not

a single point estimate for the "best" values of the regression coefficients but an entire posterior

distribution, completely describing the uncertainty surrounding the quantity. This can be used

to estimate the "best" coefficients using the mean, mode, median, any quantile (see quantile

regression), or any other function of the posterior distribution.


Quantile regression focuses on the conditional quantiles of y given X rather than the conditional

mean of y given X. Linear quantile regression models a particular conditional quantile, for

example the conditional median, as a linear function βTx of the predictors.

Mixed models are widely used to analyze linear regression relationships involving dependent

data when the dependencies have a known structure. Common applications of mixed models

include analysis of data involving repeated measurements, such as longitudinal data, or data

obtained from cluster sampling. They are generally fit as parametric models, using maximum

likelihood or Bayesian estimation. In the case where the errors are modeled as normal random

variables, there is a close connection between mixed models and generalized least squares.[18]

Fixed effects estimation is an alternative approach to analyzing this type of data.

Principal component regression (PCR)[7][8] is used when the number of predictor variables is

large, or when strong correlations exist among the predictor variables. This two-stage

procedure first reduces the predictor variables using principal component analysis then uses

the reduced variables in an OLS regression fit. While it often works well in practice, there is

no general theoretical reason that the most informative linear function of the predictor variables

should lie among the dominant principal components of the multivariate distribution of the

predictor variables. The partial least squares regression is the extension of the PCR method

which does not suffer from the mentioned deficiency.

Least-angle regression[6] is an estimation procedure for linear regression models that was

developed to handle high-dimensional covariate vectors, potentially with more covariates than

observations.

The Theil–Sen estimator is a simple robust estimation technique that chooses the slope of the

fit line to be the median of the slopes of the lines through pairs of sample points. It has similar

statistical efficiency properties to simple linear regression but is much less sensitive to

outliers.[19]
Other robust estimation techniques, including the α-trimmed mean approach[citation needed],

and L-, M-, S-, and R-estimators have been introduced.[citation needed]

Applications

See also: Linear least squares § Applications

Linear regression is widely used in biological, behavioral and social sciences to describe

possible relationships between variables. It ranks as one of the most important tools used in

these disciplines.

Trend line

Main article: Trend estimation

A trend line represents a trend, the long-term movement in time series data after other

components have been accounted for. It tells whether a particular data set (say GDP, oil prices

or stock prices) have increased or decreased over the period of time. A trend line could simply

be drawn by eye through a set of data points, but more properly their position and slope is

calculated using statistical techniques like linear regression. Trend lines typically are straight

lines, although some variations use higher degree polynomials depending on the degree of

curvature desired in the line.

Trend lines are sometimes used in business analytics to show changes in data over time. This

has the advantage of being simple. Trend lines are often used to argue that a particular action

or event (such as training, or an advertising campaign) caused observed changes at a point in

time. This is a simple technique, and does not require a control group, experimental design, or

a sophisticated analysis technique. However, it suffers from a lack of scientific validity in cases

where other potential changes can affect the data.


Epidemiology

Early evidence relating tobacco smoking to mortality and morbidity came from observational

studies employing regression analysis. In order to reduce spurious correlations when analyzing

observational data, researchers usually include several variables in their regression models in

addition to the variable of primary interest. For example, in a regression model in which

cigarette smoking is the independent variable of primary interest and the dependent variable is

lifespan measured in years, researchers might include education and income as additional

independent variables, to ensure that any observed effect of smoking on lifespan is not due to

those other socio-economic factors. However, it is never possible to include all possible

confounding variables in an empirical analysis. For example, a hypothetical gene might

increase mortality and also cause people to smoke more. For this reason, randomized controlled

trials are often able to generate more compelling evidence of causal relationships than can be

obtained using regression analyses of observational data. When controlled experiments are not

feasible, variants of regression analysis such as instrumental variables regression may be used

to attempt to estimate causal relationships from observational data.

Finance

The capital asset pricing model uses linear regression as well as the concept of beta for

analyzing and quantifying the systematic risk of an investment. This comes directly from the

beta coefficient of the linear regression model that relates the return on the investment to the

return on all risky assets.

Economics

Main article: Econometrics


Linear regression is the predominant empirical tool in economics. For example, it is used to

predict consumption spending,[20] fixed investment spending, inventory investment,

purchases of a country's exports,[21] spending on imports,[21] the demand to hold liquid

assets,[22] labor demand,[23] and labor supply.[23]

Environmental science

[icon]

This section needs expansion. You can help by adding to it. (January 2010)

Linear regression finds application in a wide range of environmental science applications. In

Canada, the Environmental Effects Monitoring Program uses statistical analyses on fish and

benthic surveys to measure the effects of pulp mill or metal mine effluent on the aquatic

ecosystem.[24]

Machine learning

Linear regression plays an important role in the field of artificial intelligence such as machine

learning. The linear regression algorithm is one of the fundamental supervised machine-

learning algorithms due to its relative simplicity and well-known properties.[25]

History

Least squares linear regression, as a means of finding a good rough linear fit to a set of points

was performed by Legendre (1805) and Gauss (1809) for the prediction of planetary

movement. Quetelet was responsible for making the procedure well-known and for using it

extensively in the social sciences.[26]

See also
icon Statistics portal

Analysis of variance

Blinder–Oaxaca decomposition

Censored regression model

Cross-sectional regression

Curve fitting

Empirical Bayes methods

Errors and residuals

Lack-of-fit sum of squares

Line fitting

Linear classifier

Linear equation

Logistic regression

M-estimator

Multivariate adaptive regression splines

Nonlinear regression

Nonparametric regression

Normal equations

Projection pursuit regression

Segmented linear regression

Stepwise regression

Structural break

Support vector machine

Truncated regression model

References
Citations

David A. Freedman (2009). Statistical Models: Theory and Practice. Cambridge University

Press. p. 26. A simple regression equation has on the right hand side an intercept and an

explanatory variable with a slope coefficient. A multiple regression equation has two or more

explanatory variables on the right hand side, each with its own slope coefficient

Rencher, Alvin C.; Christensen, William F. (2012), "Chapter 10, Multivariate regression –

Section 10.1, Introduction", Methods of Multivariate Analysis, Wiley Series in Probability and

Statistics, 709 (3rd ed.), John Wiley & Sons, p. 19, ISBN 9781118391679.

Hilary L. Seal (1967). "The historical development of the Gauss linear model". Biometrika.

54 (1/2): 1–24. doi:10.1093/biomet/54.1-2.1. JSTOR 2333849.

Yan, Xin (2009), Linear Regression Analysis: Theory and Computing, World Scientific, pp.

1–2, ISBN 9789812834119, Regression analysis ... is probably one of the oldest topics in

mathematical statistics dating back to about two hundred years ago. The earliest form of the

linear regression was the least squares method, which was published by Legendre in 1805, and

by Gauss in 1809 ... Legendre and Gauss both applied the method to the problem of

determining, from astronomical observations, the orbits of bodies about the sun.

Tibshirani, Robert (1996). "Regression Shrinkage and Selection via the Lasso". Journal of the

Royal Statistical Society, Series B. 58 (1): 267–288. JSTOR 2346178.

Efron, Bradley; Hastie, Trevor; Johnstone, Iain; Tibshirani, Robert (2004). "Least Angle

Regression". The Annals of Statistics. 32 (2): 407–451. arXiv:math/0406456.

doi:10.1214/009053604000000067. JSTOR 3448465.

Hawkins, Douglas M. (1973). "On the Investigation of Alternative Regressions by Principal

Component Analysis". Journal of the Royal Statistical Society, Series C. 22 (3): 275–286.

JSTOR 2346776.
Jolliffe, Ian T. (1982). "A Note on the Use of Principal Components in Regression". Journal of

the Royal Statistical Society, Series C. 31 (3): 300–303. JSTOR 2348005.

Berk, Richard A. (2007). "Regression Analysis: A Constructive Critique". Criminal Justice

Review. 32 (3): 301–302. doi:10.1177/0734016807304871.

Warne, Russell T. (2011). "Beyond multiple regression: Using commonality analysis to better

understand R2 results". Gifted Child Quarterly. 55 (4): 313–318.

doi:10.1177/0016986211422217.

Brillinger, David R. (1977). "The Identification of a Particular Nonlinear Time Series System".

Biometrika. 64 (3): 509–515. doi:10.1093/biomet/64.3.509. JSTOR 2345326.

Lange, Kenneth L.; Little, Roderick J. A.; Taylor, Jeremy M. G. (1989). "Robust Statistical

Modeling Using the t Distribution" (PDF). Journal of the American Statistical Association. 84

(408): 881–896. doi:10.2307/2290063. JSTOR 2290063.

Swindel, Benee F. (1981). "Geometry of Ridge Regression Illustrated". The American

Statistician. 35 (1): 12–15. doi:10.2307/2683577. JSTOR 2683577.

Draper, Norman R.; van Nostrand; R. Craig (1979). "Ridge Regression and James-Stein

Estimation: Review and Comments". Technometrics. 21 (4): 451–466. doi:10.2307/1268284.

JSTOR 1268284.

Hoerl, Arthur E.; Kennard, Robert W.; Hoerl, Roger W. (1985). "Practical Use of Ridge

Regression: A Challenge Met". Journal of the Royal Statistical Society, Series C. 34 (2): 114–

120. JSTOR 2347363.

Narula, Subhash C.; Wellington, John F. (1982). "The Minimum Sum of Absolute Errors

Regression: A State of the Art Survey". International Statistical Review. 50 (3): 317–326.

doi:10.2307/1402501. JSTOR 1402501.

Stone, C. J. (1975). "Adaptive maximum likelihood estimators of a location parameter". The

Annals of Statistics. 3 (2): 267–284. doi:10.1214/aos/1176343056. JSTOR 2958945.


Goldstein, H. (1986). "Multilevel Mixed Linear Model Analysis Using Iterative Generalized

Least Squares". Biometrika. 73 (1): 43–56. doi:10.1093/biomet/73.1.43. JSTOR 2336270.

Theil, H. (1950). "A rank-invariant method of linear and polynomial regression analysis. I, II,

III". Nederl. Akad. Wetensch., Proc. 53: 386–392, 521–525, 1397–1412. MR 0036489; Sen,

Pranab Kumar (1968). "Estimates of the regression coefficient based on Kendall's tau". Journal

of the American Statistical Association. 63 (324): 1379–1389. doi:10.2307/2285891. JSTOR

2285891. MR 0258201.

Deaton, Angus (1992). Understanding Consumption. Oxford University Press. ISBN 978-0-

19-828824-4.

Krugman, Paul R.; Obstfeld, M.; Melitz, Marc J. (2012). International Economics: Theory and

Policy (9th global ed.). Harlow: Pearson. ISBN 9780273754091.

Laidler, David E. W. (1993). The Demand for Money: Theories, Evidence, and Problems (4th

ed.). New York: Harper Collins. ISBN 978-0065010985.

Ehrenberg; Smith (2008). Modern Labor Economics (10th international ed.). London:

Addison-Wesley. ISBN 9780321538963.

EEMP webpage Archived 2011-06-11 at the Wayback Machine

"Linear Regression (Machine Learning)" (PDF). University of Pittsburgh.

Stigler, Stephen M. (1986). The History of Statistics: The Measurement of Uncertainty before

1900. Cambridge: Harvard. ISBN 0-674-40340-1.

Sources

Cohen, J., Cohen P., West, S.G., & Aiken, L.S. (2003). Applied multiple regression/correlation

analysis for the behavioral sciences. (2nd ed.) Hillsdale, NJ: Lawrence Erlbaum Associates

Charles Darwin. The Variation of Animals and Plants under Domestication. (1868) (Chapter

XIII describes what was known about reversion in Galton's time. Darwin uses the term

"reversion".)
Draper, N.R.; Smith, H. (1998). Applied Regression Analysis (3rd ed.). John Wiley. ISBN 978-

0-471-17082-2.

Francis Galton. "Regression Towards Mediocrity in Hereditary Stature," Journal of the

Anthropological Institute, 15:246-263 (1886). (Facsimile at: [1])

Robert S. Pindyck and Daniel L. Rubinfeld (1998, 4h ed.). Econometric Models and Economic

Forecasts, ch. 1 (Intro, incl. appendices on Σ operators & derivation of parameter est.) &

Appendix 4.3 (mult. regression in matrix form).

Further reading

Pedhazur, Elazar J (1982). Multiple regression in behavioral research: Explanation and

prediction (2nd ed.). New York: Holt, Rinehart and Winston. ISBN 978-0-03-041760-3.

Mathieu Rouaud, 2013: Probability, Statistics and Estimation Chapter 2: Linear Regression,

Linear Regression with Error Bars and Nonlinear Regression.

National Physical Laboratory (1961). "Chapter 1: Linear Equations and Matrices: Direct

Methods". Modern Computing Methods. Notes on Applied Science. 16 (2nd ed.). Her Majesty's

Stationery Office

Regresi linier

Dalam statistik, regresi linier adalah pendekatan linier untuk memodelkan hubungan antara

respons skalar (atau variabel dependen) dan satu atau lebih variabel penjelas (atau variabel

independen). Kasus satu variabel penjelas disebut regresi linier sederhana. Untuk lebih dari

satu variabel penjelas, prosesnya disebut regresi linier berganda. [1] Istilah ini berbeda dari

regresi linier multivariat, di mana beberapa variabel dependen berkorelasi diprediksi, bukan

variabel skalar tunggal. [2]


Dalam regresi linier, hubungan dimodelkan menggunakan fungsi prediktor linier yang

parameter model yang tidak diketahui diperkirakan dari data. Model semacam itu disebut

model linier. [3] Paling umum, rata-rata kondisional dari respons yang diberikan nilai-nilai dari

variabel penjelas (atau prediktor) diasumsikan sebagai fungsi affine dari nilai-nilai

tersebut; lebih jarang, median kondisional atau kuantil lainnya digunakan. Seperti semua

bentuk analisis regresi, regresi linier berfokus pada distribusi probabilitas bersyarat dari

respons yang diberikan nilai-nilai prediktor, bukan pada distribusi probabilitas gabungan dari

semua variabel ini, yang merupakan domain dari analisis multivariat.

Regresi linier adalah jenis analisis regresi pertama yang dipelajari secara ketat, dan digunakan

secara luas dalam aplikasi praktis. [4] Ini karena model yang bergantung secara linier pada

parameter yang tidak diketahui mereka lebih mudah disesuaikan daripada model yang tidak

terkait linier dengan parameternya dan karena sifat statistik dari penduga yang dihasilkan lebih

mudah untuk ditentukan.

Regresi linier memiliki banyak kegunaan praktis. Sebagian besar aplikasi termasuk dalam

salah satu dari dua kategori luas berikut:

Jika tujuannya adalah prediksi, atau perkiraan, atau pengurangan kesalahan, [klarifikasi

diperlukan] regresi linier dapat digunakan agar sesuai dengan model prediktif dengan set data

yang diamati dari nilai-nilai respon dan variabel penjelas. Setelah mengembangkan model
seperti itu, jika nilai-nilai tambahan dari variabel penjelas dikumpulkan tanpa nilai respons

yang menyertainya, model yang sesuai dapat digunakan untuk membuat prediksi tanggapan.

Jika tujuannya adalah untuk menjelaskan variasi dalam variabel respons yang dapat dikaitkan

dengan variasi dalam variabel penjelas, analisis regresi linier dapat diterapkan untuk mengukur

kekuatan hubungan antara respons dan variabel penjelas, dan khususnya untuk menentukan
apakah beberapa variabel penjelas mungkin tidak memiliki hubungan linier dengan respons

sama sekali, atau untuk mengidentifikasi himpunan bagian dari variabel penjelas yang mungkin
berisi informasi yang berlebihan tentang respons tersebut.
Model regresi linier sering dipasang menggunakan pendekatan kuadrat terkecil, tetapi mereka

juga dapat dipasang dengan cara lain, seperti dengan meminimalkan "kurangnya kecocokan"

dalam beberapa norma lain (seperti dengan regresi deviasi absolut terkecil), atau dengan

meminimalkan hukuman versi dari fungsi biaya kuadrat terkecil seperti pada regresi ridge

(penalti norma L2) dan laso (penalti norma-L1). Sebaliknya, pendekatan kuadrat terkecil dapat

digunakan agar sesuai dengan model yang bukan model linier. Jadi, meskipun istilah "kuadrat

terkecil" dan "model linier" sangat terkait, mereka tidak identik.

Isi

1 Pendahuluan

1.1 Asumsi

1.2 Interpretasi

2 ekstensi

2.1 Regresi linier sederhana dan berganda

2.2 Model linier umum

2.3 Model heteroskedastik

2.4 Model linear umum

2.5 Model linear hierarkis

2.6 Kesalahan-dalam-variabel

2.7 Lainnya
3 metode estimasi

3.1 Estimasi kuadrat terkecil dan teknik terkait

3.2 Estimasi kemungkinan maksimum dan teknik terkait

3.3 Teknik estimasi lainnya

4 Aplikasi
4.1 Garis tren

4.2 Epidemiologi
4.3 Keuangan
4.4 Ekonomi

4.5 Ilmu lingkungan

4.6 Pembelajaran mesin

5 Sejarah

6 Lihat juga

7 Referensi

7.1 Kutipan

7.2 Sumber

8 Bacaan lebih lanjut

9 Tautan eksternal

pengantar

Dalam regresi linier, pengamatan (merah) diasumsikan sebagai hasil dari penyimpangan acak

(hijau) dari hubungan yang mendasarinya (biru) antara variabel dependen (y) dan variabel

independen (x).

Diberikan kumpulan data {\ displaystyle \ {y_ {i}, \, x_ {i1}, \ ldots, x_ {ip} \} _ {i = 1} ^

{n}} \ {y_ {i}, \, x_ {i1}, \ ldots, x_ {ip} \} _ {i = 1} ^ {n} dari unit statistik, model regresi

linier mengasumsikan bahwa hubungan antara variabel dependen y dan p-vektor dari regresi x

linear. Hubungan ini dimodelkan melalui istilah gangguan atau variabel kesalahan ε - variabel

acak yang tidak teramati yang menambahkan "noise" ke hubungan linier antara variabel

dependen dan regresi. Jadi model mengambil bentuk

{\ displaystyle y_ {i} = \ beta _ {0} + \ beta _ {1} x_ {i1} + \ cdots + \ beta _ {p} x_ {ip} + \

varepsilon _ {i} = \ mathbf { x} _ {i} ^ {\ mathsf {T}} {\ boldsymbol {\ beta}} + \ varepsilon

_ {i}, \ qquad i = 1, \ ldots, n,} {\ displaystyle y_ {i} = \ beta _ {0} + \ beta _ {1} x_ {i1} + \

cdots + \ beta _ {p} x_ {ip} + \ varepsilon _ {i} = \ mathbf {x} _ {i} ^ { \ mathsf {T}} {\
boldsymbol {\ beta}} + \ varepsilon _ {i}, \ qquad i = 1, \ ldots, n,}

di mana T menunjukkan transpose, sehingga xiTβ adalah produk dalam antara vektor xi dan β.
Seringkali n persamaan ini disusun bersama dan ditulis dalam notasi matriks sebagai

{\ displaystyle \ mathbf {y} = X {\ boldsymbol {\ beta}} + {\ boldsymbol {\ varepsilon}}, \,}

{\ displaystyle \ mathbf {y} = X {\ boldsymbol {\ beta}} + {\ boldsymbol {\ varepsilon}}, \,}

dimana

{\ displaystyle \ mathbf {y} = {\ begin {pmatrix} y_ {1} \\ y_ {2} \\ vdots \\ y_ {n} \ end

{pmatrix}}, \ quad} \ mathbf {y} = {\ begin {pmatrix} y_ {1} \\ y_ {2} \\ vdots \\ y_ {n} \ end

{pmatrix}}, \ quad

{\ displaystyle X = {\ begin {pmatrix} \ mathbf {x} _ {1} ^ {\ mathsf {T}} mathbf {x} _ {2}

^ {\ mathsf {T}} \\ \\ vdots \ mathbf {x} _ {n} ^ {\ mathsf {T}} \ end {pmatrix}} = {\ begin

{pmatrix} 1 & x_ {11} & \ cdots & x_ {1p} \\ 1 & x_ {21} & \ cdots & x_ {2p} \\ vdots & \

vdots & \ ddots & \ vdots \\ 1 & x_ {n1} & \ cdots & x_ {np} \ end {pmatrix}},} {\ displaystyle

X = {\ begin { pmatrix} \ mathbf {x} _ {1} ^ {\ mathsf {T}} mathbf {x} _ {2} ^ {\ mathsf

{T}} \\ vdots \\ mathbf {x} _ {n} ^ {\ mathsf {T}} \ end {pmatrix}} = {\ begin {pmatrix} 1 &

x_ {11} & \ cdots & x_ {1p} \\ 1 & x_ {21} & \ cdots & x_ {2p} \\ \ vdots & \ vdots & \ ddots

& \ vdots \\ 1 & x_ {n1} & \ cdots & x_ {np} \ end {pmatrix}},}

{\ displaystyle {\ boldsymbol {\ beta}} = {\ begin {pmatrix} \ beta _ {0} \\ beta _ {1} \\ beta _

{2} \\ vdots \\\ beta _ { p} \ end {pmatrix}}, \ quad {\ boldsymbol {\ varepsilon}} = {\ begin

{pmatrix} \ varepsilon _ {1} \\ varepsilon _ {2} \\ vdots \\\ varepsilon _ { n} \ end {pmatrix}}.}

{\ displaystyle {\ boldsymbol {\ beta}} = {\ begin {pmatrix} \ beta _ {0} \\ beta _ {1} \\ beta _
{2} \\ vdots beta _ {p} \ end {pmatrix}}, \ quad {\ boldsymbol {\ varepsilon}} = {\ begin

{pmatrix} \ varepsilon _ {1} \\ varepsilon _ {2} \\ vdots \ varepsilon _ {n} \ end {pmatrix}}.}

Beberapa komentar tentang notasi dan terminologi:

{\ displaystyle \ mathbf {y}} \ mathbf {y} adalah vektor dari nilai yang diamati {\ displaystyle
y_ {i} \ (i = 1, \ ldots, n)} {\ displaystyle y_ {i} \ (i = 1, \ ldots, n)} dari variabel yang disebut

regresi dan, variabel endogen, variabel respons, variabel terukur, variabel kriteria, atau variabel
dependen. Variabel ini kadang-kadang juga dikenal sebagai variabel prediksi, tetapi ini
tidak boleh dikacaukan dengan nilai prediksi, yang dilambangkan {\ displaystyle {\ hat {y}}}

{\ hat {y}}. Keputusan untuk variabel mana dalam suatu set data dimodelkan sebagai variabel

dependen dan yang dimodelkan sebagai variabel independen dapat didasarkan pada anggapan

bahwa nilai salah satu variabel disebabkan oleh, atau langsung dipengaruhi oleh variabel

lain. Atau, mungkin ada alasan operasional untuk memodelkan salah satu variabel dalam hal

yang lain, dalam hal ini tidak perlu ada anggapan kausalitas.

{\ displaystyle X} X dapat dilihat sebagai matriks vektor baris {\ displaystyle \ mathbf {x} _

{i}} \ mathbf {x} _ {i} atau dari vektor-vektor kolom n-dimensi {\ displaystyle X_ {j}} X_

{j}, yang dikenal sebagai regressor, variabel eksogen, variabel penjelas, kovariat, variabel

input, variabel prediktor, atau variabel independen (jangan disamakan dengan konsep variabel

acak independen). Matriks {\ displaystyle X} X kadang-kadang disebut matriks desain.

Biasanya konstanta dimasukkan sebagai salah satu regresi. Secara khusus, {\ displaystyle \

mathbf {x} _ {i0} = 1} {\ displaystyle \ mathbf {x} _ {i0} = 1} untuk {\ displaystyle i = 1, \

ldots, n} i = 1, \ ldots, n. Elemen yang sesuai dari β disebut intersep. Banyak prosedur inferensi

statistik untuk model linier memerlukan intersep untuk hadir, sehingga sering dimasukkan

bahkan jika pertimbangan teoritis menunjukkan bahwa nilainya harus nol.

Kadang-kadang salah satu regressor dapat menjadi fungsi non-linear dari regressor lain atau

data, seperti dalam regresi polinomial dan regresi tersegmentasi. Model tetap linier selama

linier dalam vektor parameter β.

Nilai xij dapat dilihat sebagai nilai yang diamati dari variabel acak Xj atau sebagai nilai tetap

yang dipilih sebelum mengamati variabel dependen. Kedua interpretasi mungkin sesuai dalam
kasus yang berbeda, dan mereka umumnya mengarah pada prosedur estimasi yang

sama; Namun pendekatan yang berbeda untuk analisis asimptotik digunakan dalam dua situasi

ini.

{\ displaystyle {\ boldsymbol {\ beta}}} {\ boldsymbol {\ beta}} adalah {\ displaystyle (p +

1)} (p + 1) vektor parameter dimensi, di mana {\ displaystyle \ beta _ {0 }} \ beta _ {0} adalah
istilah intersep (jika seseorang dimasukkan dalam model — jika tidak {\ displaystyle {\

boldsymbol {\ beta}}} {\ boldsymbol {\ beta}} adalah p-dimensional). Unsur-unsurnya


dikenal sebagai efek atau koefisien regresi (meskipun istilah yang terakhir kadang-kadang
dicadangkan untuk efek yang diperkirakan). Estimasi statistik dan kesimpulan dalam regresi

linier berfokus pada β. Elemen-elemen dari vektor parameter ini ditafsirkan sebagai turunan

parsial dari variabel dependen sehubungan dengan berbagai variabel independen.

{\ displaystyle {\ boldsymbol {\ varepsilon}}} {\ displaystyle {\ boldsymbol {\ varepsilon}}}

adalah vektor nilai {\ displaystyle \ varepsilon _ {i}} \ varepsilon _ {i}. Bagian dari model ini

disebut istilah kesalahan, istilah gangguan, atau kadang-kadang kebisingan (berbeda dengan

"sinyal" yang disediakan oleh seluruh model). Variabel ini menangkap semua faktor lain yang

memengaruhi variabel dependen y selain dari regresi x. Hubungan antara istilah kesalahan dan

regresi, misalnya korelasinya, adalah pertimbangan penting dalam merumuskan model regresi

linier, karena akan menentukan metode estimasi yang tepat.

Contoh. Pertimbangkan sebuah situasi di mana bola kecil dilemparkan ke udara dan kemudian

kita mengukur ketinggian pendakiannya pada berbagai momen waktu. Fisika memberi tahu

kita bahwa, mengabaikan hambatan, hubungan dapat dimodelkan sebagai

{\ displaystyle h_ {i} = \ beta _ {1} t_ {i} + \ beta _ {2} t_ {i} ^ {2} + \ varepsilon _ {i},} h_

{i} = \ beta _ {1} t_ {i} + \ beta _ {2} t_ {i} ^ {2} + \ varepsilon _ {i},

di mana β1 menentukan kecepatan awal bola, β2 sebanding dengan gravitasi standar, dan εi

disebabkan oleh kesalahan pengukuran. Regresi linier dapat digunakan untuk memperkirakan

nilai β1 dan β2 dari data yang diukur. Model ini non-linear dalam variabel waktu, tetapi linear

dalam parameter β1 dan β2; jika kita mengambil regresi xi = (xi1, xi2) = (ti, ti2), model

mengambil bentuk standar

{\ displaystyle h_ {i} = \ mathbf {x} _ {i} ^ {\ mathsf {T}} {\ boldsymbol {\ beta}} + \

varepsilon _ {i}.} {\ displaystyle h_ {i} = \ mathbf {x} _ {i} ^ {\ mathsf {T}} {\ boldsymbol

{\ beta}} + \ varepsilon _ {i}.}

Asumsi
Lihat juga: Kuadrat terkecil biasa § Asumsi

Model regresi linier standar dengan teknik estimasi standar membuat sejumlah asumsi tentang
variabel prediktor, variabel respons, dan hubungannya. Banyak ekstensi telah dikembangkan
yang memungkinkan masing-masing asumsi ini untuk dilonggarkan (yaitu dikurangi menjadi

bentuk yang lebih lemah), dan dalam beberapa kasus dihilangkan seluruhnya. Secara umum

ekstensi ini membuat prosedur estimasi lebih kompleks dan memakan waktu, dan mungkin

juga memerlukan lebih banyak data untuk menghasilkan model yang sama persis.

Contoh regresi polinomial kubik, yang merupakan jenis regresi linier.

Berikut ini adalah asumsi utama yang dibuat oleh model regresi linier standar dengan teknik

estimasi standar (misalnya kuadrat terkecil biasa):

Eksogenitas yang lemah. Ini pada dasarnya berarti bahwa variabel prediktor x dapat

diperlakukan sebagai nilai tetap, bukan variabel acak. Ini berarti, misalnya, bahwa variabel

prediktor diasumsikan bebas kesalahan — yaitu, tidak terkontaminasi dengan kesalahan

pengukuran. Meskipun asumsi ini tidak realistis di banyak pengaturan, menjatuhkannya

mengarah ke model kesalahan-dalam-variabel yang jauh lebih sulit.

Linearitas. Ini berarti bahwa rata-rata dari variabel respon adalah kombinasi linear dari

parameter (koefisien regresi) dan variabel prediktor. Perhatikan bahwa asumsi ini jauh lebih

tidak membatasi daripada yang terlihat pada awalnya. Karena variabel prediktor diperlakukan

sebagai nilai tetap (lihat di atas), linearitas sebenarnya hanyalah pembatasan pada

parameter. Variabel prediktor itu sendiri dapat diubah secara sewenang-wenang, dan pada

kenyataannya beberapa salinan dari variabel prediktor yang mendasari yang sama dapat
ditambahkan, masing-masing ditransformasikan secara berbeda. Teknik ini digunakan,

misalnya, dalam regresi polinomial, yang menggunakan regresi linier agar sesuai dengan

variabel respons sebagai fungsi polinomial sewenang-wenang (hingga peringkat tertentu) dari

variabel prediktor. Ini membuat regresi linier metode inferensi yang sangat kuat. Bahkan,

model-model seperti regresi polinomial seringkali "terlalu kuat", karena mereka cenderung
menyesuaikan data. Akibatnya, beberapa jenis regularisasi harus digunakan untuk mencegah

solusi yang tidak masuk akal keluar dari proses estimasi. Contoh umum adalah regresi ridge
dan regresi laso. Regresi linier Bayesian juga dapat digunakan, yang pada dasarnya lebih kebal
terhadap masalah overfitting. (Faktanya, regresi ridge dan regresi laso dapat dipandang sebagai

kasus khusus dari regresi linier Bayesian, dengan jenis distribusi tertentu yang sebelumnya

ditempatkan pada koefisien regresi.)

Varians konstan (alias homoscedasticity). Ini berarti bahwa nilai yang berbeda dari variabel

respons memiliki varians yang sama dalam kesalahan mereka, terlepas dari nilai variabel

prediktor. Dalam praktiknya asumsi ini tidak valid (yaitu kesalahannya heteroscedastic) jika

variabel respons dapat bervariasi dalam skala luas. Untuk memeriksa varians kesalahan

heterogen, atau ketika pola residu melanggar asumsi model homoseksualitas (kesalahan sama-

sama variabel di sekitar 'garis paling pas' untuk semua titik x), sebaiknya mencari "efek

mengipasi" "antara kesalahan residual dan nilai prediksi. Ini untuk mengatakan akan ada

perubahan sistematis dalam residu absolut atau kuadrat ketika diplot terhadap variabel

prediktif. Kesalahan tidak akan didistribusikan secara merata di seluruh garis

regresi. Heteroskedastisitas akan menghasilkan rerata dari varian yang dapat dibedakan di

sekitar titik untuk mendapatkan varian tunggal yang secara tidak akurat mewakili semua varian

garis. Akibatnya, residu muncul berkerumun dan menyebar terpisah pada plot yang diprediksi

untuk nilai yang lebih besar dan lebih kecil untuk poin di sepanjang garis regresi linier, dan

kesalahan kuadrat rata-rata untuk model akan salah. Misalnya, variabel respons yang rerata

besar akan memiliki varian yang lebih besar daripada variabel yang rerata kecil. Misalnya,

orang tertentu yang penghasilannya diperkirakan $ 100.000 dapat dengan mudah memiliki

penghasilan aktual $ 80.000 atau $ 120.000 (standar deviasi sekitar $ 20.000), sementara orang

lain dengan prediksi pendapatan $ 10.000 tidak mungkin memiliki standar deviasi $ 20.000
yang sama , yang akan menyiratkan penghasilan aktual mereka akan bervariasi di mana saja

antara - $ 10.000 dan $ 30.000. (Faktanya, seperti yang diperlihatkan ini, dalam banyak kasus

— seringkali kasus yang sama di mana asumsi kesalahan berdistribusi normal gagal — varians

atau standar deviasi harus diprediksi proporsional dengan rata-rata, daripada konstan). Metode

estimasi regresi linier sederhana memberikan estimasi parameter yang kurang tepat dan jumlah
inferensial yang menyesatkan seperti kesalahan standar ketika ada heteroskedastisitas

substansial. Namun, berbagai teknik estimasi (misalnya kuadrat terkecil tertimbang dan
kesalahan standar yang konsisten dengan heteroskedastisitas) dapat menangani
heteroskedastisitas dengan cara yang cukup umum. Teknik regresi linear Bayesian juga dapat

digunakan ketika varians diasumsikan sebagai fungsi dari rata-rata. Dalam beberapa kasus juga

dimungkinkan untuk memperbaiki masalah dengan menerapkan transformasi pada variabel

respons (mis. Sesuai dengan logaritma variabel respons menggunakan model regresi linier,

yang menyiratkan bahwa variabel respons memiliki distribusi log-normal daripada normal.

distribusi).

Independensi kesalahan. Ini mengasumsikan bahwa kesalahan dari variabel respon tidak

berkorelasi satu sama lain. (Independensi statistik aktual adalah kondisi yang lebih kuat

daripada kurangnya korelasi dan seringkali tidak diperlukan, meskipun dapat dieksploitasi jika

diketahui tahan.) Beberapa metode (misalnya kuadrat terkecil yang digeneralisasi) mampu

menangani kesalahan yang berkorelasi, meskipun biasanya membutuhkan lebih banyak data

secara signifikan kecuali beberapa jenis regularisasi digunakan untuk bias model terhadap

asumsi kesalahan yang tidak berkorelasi. Regresi linier Bayesian adalah cara umum untuk

menangani masalah ini.

Kurangnya multikolinieritas sempurna pada prediktor. Untuk metode estimasi kuadrat terkecil

standar, matriks desain X harus memiliki p peringkat kolom penuh; jika tidak, kami memiliki

kondisi yang dikenal sebagai multikolinieritas sempurna dalam variabel prediktor. Ini dapat

dipicu dengan memiliki dua atau lebih variabel prediktor yang berkorelasi sempurna (misalnya

jika variabel prediktor yang sama diberikan dua kali secara keliru, baik tanpa mengubah salah

satu salinan atau dengan mengubah salah satu salinan secara linear). Ini juga dapat terjadi jika

ada terlalu sedikit data yang tersedia dibandingkan dengan jumlah parameter yang akan
diestimasi (misalnya, lebih sedikit poin data dari koefisien regresi). Dalam kasus

multikolinieritas sempurna, vektor parameter β tidak akan dapat diidentifikasi — ia tidak

memiliki solusi unik. Paling-paling kita akan dapat mengidentifikasi beberapa parameter, yaitu

mempersempit nilainya ke beberapa subruang linier sebesar Rp. Lihat regresi kuadrat terkecil

parsial. Metode untuk menyesuaikan model linier dengan multikolinearitas telah


dikembangkan; [5] [6] [7] [8] beberapa memerlukan asumsi tambahan seperti "efek sparsity" -

bahwa sebagian besar efeknya sama dengan nol.


Perhatikan bahwa algoritma iterasi yang lebih mahal secara komputasi untuk estimasi

parameter, seperti yang digunakan dalam model linier umum, tidak mengalami masalah ini.

Di luar asumsi-asumsi ini, beberapa sifat statistik lainnya dari data sangat memengaruhi kinerja

berbagai metode estimasi:

Hubungan statistik antara istilah kesalahan dan regressor memainkan peran penting dalam

menentukan apakah prosedur estimasi memiliki sifat sampling yang diinginkan seperti tidak

bias dan konsisten.

Pengaturan, atau distribusi probabilitas variabel prediktor x memiliki pengaruh besar pada

ketepatan estimasi β. Pengambilan sampel dan desain eksperimen adalah subbidang statistik

yang sangat maju yang menyediakan panduan untuk mengumpulkan data sedemikian rupa

untuk mencapai perkiraan yang tepat dari β.

Interpretasi

Set data dalam kuartet Anscombe dirancang untuk memiliki garis regresi linier yang hampir

sama (serta cara yang hampir identik, standar deviasi, dan korelasi) tetapi secara grafis sangat

berbeda. Ini menggambarkan perangkap mengandalkan hanya pada model yang pas untuk

memahami hubungan antara variabel.

Model regresi linier yang pas dapat digunakan untuk mengidentifikasi hubungan antara

variabel prediktor tunggal xj dan variabel respons y ketika semua variabel prediktor lain dalam

model "dipegang tetap". Secara khusus, interpretasi βj adalah perubahan yang diharapkan
dalam y untuk perubahan satu unit dalam xj ketika kovariat lainnya dipertahankan tetap - yaitu,

nilai yang diharapkan dari turunan parsial y sehubungan dengan xj. Ini kadang-kadang disebut

efek unik xj pada y. Sebaliknya, efek marginal dari xj pada y dapat dinilai dengan

menggunakan koefisien korelasi atau model regresi linier sederhana yang hanya

menghubungkan xj ke y; efek ini adalah turunan total y sehubungan dengan xj.

Kehati-hatian harus diambil ketika menafsirkan hasil regresi, karena beberapa regressor
mungkin tidak memungkinkan untuk perubahan marjinal (seperti variabel dummy, atau istilah
intersep), sementara yang lain tidak dapat dipertahankan (ingat contoh dari pengantar: itu tidak

mungkin untuk "tahan ti" dan pada saat yang sama ubah nilai ti2).

Mungkin saja efek uniknya bisa hampir nol bahkan ketika efek marginalnya besar. Ini mungkin

menyiratkan bahwa beberapa kovariat lain menangkap semua informasi dalam xj, sehingga

begitu variabel itu ada dalam model, tidak ada kontribusi xj terhadap variasi dalam

y. Sebaliknya, efek unik dari xj bisa besar sementara efek marginalnya hampir nol. Ini akan

terjadi jika kovariat lainnya menjelaskan banyak variasi dari y, tetapi mereka terutama

menjelaskan variasi dengan cara yang melengkapi apa yang ditangkap oleh xj. Dalam hal ini,

termasuk variabel lain dalam model mengurangi bagian dari variabilitas y yang tidak terkait

dengan xj, sehingga memperkuat hubungan yang terlihat dengan xj.

Arti ungkapan "tetap" mungkin tergantung pada bagaimana nilai-nilai variabel prediktor

muncul. Jika pelaku eksperimen secara langsung menetapkan nilai-nilai variabel prediktor

sesuai dengan desain penelitian, perbandingan minat dapat benar-benar sesuai dengan

perbandingan di antara unit-unit yang variabel prediktornya telah "dipertahankan" oleh

eksperimen. Atau, ekspresi "tetap" dapat merujuk pada pilihan yang terjadi dalam konteks

analisis data. Dalam hal ini, kami "menahan variabel tetap" dengan membatasi perhatian kami

pada himpunan bagian data yang kebetulan memiliki nilai umum untuk variabel prediktor yang

diberikan. Ini adalah satu-satunya interpretasi "tetap" yang dapat digunakan dalam penelitian

observasional.

Gagasan "efek unik" menarik ketika mempelajari sistem yang kompleks di mana beberapa

komponen yang saling terkait mempengaruhi variabel respons. Dalam beberapa kasus, secara

harfiah dapat diartikan sebagai efek kausal dari intervensi yang terkait dengan nilai variabel

prediktor. Namun, telah diperdebatkan bahwa dalam banyak kasus analisis regresi berganda
gagal untuk mengklarifikasi hubungan antara variabel prediktor dan variabel respon ketika

prediktor berkorelasi satu sama lain dan tidak ditugaskan mengikuti desain penelitian.
[9] Analisis kesamaan mungkin membantu dalam mengurai dampak bersama dan unik dari

variabel independen yang berkorelasi. [10]

Ekstensi

Banyak ekstensi regresi linier telah dikembangkan, yang memungkinkan beberapa atau semua

asumsi yang mendasari model dasar menjadi santai.

Regresi linier sederhana dan berganda

Contoh regresi linier sederhana, yang memiliki satu variabel independen

Kasus yang paling sederhana dari variabel prediktor skalar tunggal x dan variabel respons

skalar tunggal y dikenal sebagai regresi linier sederhana. Perpanjangan ke variabel prediktor

berganda dan / atau bernilai vektor (dilambangkan dengan huruf kapital X) dikenal sebagai

regresi linier berganda, juga dikenal sebagai regresi linier multivariabel. Hampir semua model

regresi dunia nyata melibatkan banyak prediktor, dan deskripsi dasar regresi linier sering

diungkapkan dalam istilah model regresi berganda. Namun, perhatikan bahwa dalam kasus-

kasus ini variabel respons y masih berupa skalar. Istilah lain, regresi linier multivariat, merujuk

pada kasus-kasus di mana y adalah vektor, yaitu, sama dengan regresi linier umum.

Model linier umum

Model linear umum mempertimbangkan situasi ketika variabel respon bukan skalar (untuk
setiap pengamatan) tetapi vektor, yi. Linearitas bersyarat {\ displaystyle E (\ mathbf {y} \ mid

\ mathbf {x} _ {i}) = \ mathbf {x} _ {i} ^ {\ mathsf {T}} B} {\ displaystyle E ( \ mathbf {y} \

mid \ mathbf {x} _ {i}) = \ mathbf {x} _ {i} ^ {\ mathsf {T}} B} masih diasumsikan, dengan

matriks B yang menggantikan vektor β dari model regresi linier klasik. Analog multivariat dari

kuadrat terkecil biasa (OLS) dan kuadrat terkecil umum (GLS) telah dikembangkan. "Model
linear umum" juga disebut "model linier multivarian". Ini tidak sama dengan model linier

multivariabel (juga disebut "model linier berganda").


Model heteroskedastik

Berbagai model telah dibuat yang memungkinkan heteroskedastisitas, yaitu kesalahan untuk

variabel respons yang berbeda mungkin memiliki varian yang berbeda. Sebagai contoh,

kuadrat terkecil tertimbang adalah metode untuk memperkirakan model regresi linier ketika

variabel respon mungkin memiliki varian kesalahan yang berbeda, mungkin dengan kesalahan

yang berkorelasi. (Lihat juga kuadrat terkecil linier tertimbang, dan kuadrat terkecil umum.)

Kesalahan standar yang konsisten heteroskedastisitas adalah metode yang ditingkatkan untuk

digunakan dengan kesalahan tidak berkorelasi tetapi berpotensi heteroskedastik.

Model linier umum

Generalized linear models (GLMs) adalah kerangka kerja untuk memodelkan variabel respon

yang dibatasi atau diskrit. Ini digunakan, misalnya:

ketika memodelkan jumlah positif (mis. harga atau populasi) yang bervariasi dalam skala besar

— yang lebih baik dideskripsikan dengan menggunakan distribusi miring seperti distribusi log-

normal atau distribusi Poisson (meskipun GLM tidak digunakan untuk data log-normal, alih-

alih responsnya variabel hanya ditransformasikan menggunakan fungsi logaritma);

ketika memodelkan data kategorikal, seperti pilihan kandidat yang diberikan dalam pemilihan

(yang lebih baik dijelaskan menggunakan distribusi Bernoulli / distribusi binomial untuk

pilihan biner, atau distribusi kategorikal / distribusi multinomial untuk pilihan multi-arah), di

mana ada sejumlah pilihan tetap yang tidak dapat dipesan secara bermakna;
ketika memodelkan data ordinal, misalnya peringkat pada skala dari 0 hingga 5, di mana hasil

yang berbeda dapat dipesan tetapi di mana kuantitas itu sendiri mungkin tidak memiliki makna

absolut (misalnya peringkat 4 mungkin tidak "dua kali lebih baik" dalam tujuan apa pun) akal

sebagai peringkat 2, tetapi hanya menunjukkan bahwa itu lebih baik dari 2 atau 3 tetapi tidak

sebagus 5).
Model linier umum memungkinkan untuk fungsi tautan acak, g, yang menghubungkan rata-

rata variabel respons dengan prediktor: {\ displaystyle E (Y) = g ^ {- 1} (XB)} {\ displaystyle


E ( Y) = g ^ {- 1} (XB)}. Fungsi tautan sering dikaitkan dengan distribusi respons, dan
khususnya itu biasanya memiliki efek mengubah antara rentang {\ displaystyle (- \ infty, \

infty)} (- \ infty, \ infty) dari prediktor linier dan rentang variabel respons.

Beberapa contoh umum GLM adalah:

Regresi poisson untuk menghitung data.

Regresi logistik dan regresi probit untuk data biner.

Regresi logistik multinomial dan regresi probit multinomial untuk data kategorikal.

Memerintahkan logit dan memerintahkan regresi probit untuk data ordinal.

Model indeks tunggal [klarifikasi diperlukan] memungkinkan beberapa derajat nonlinier dalam

hubungan antara x dan y, sambil mempertahankan peran sentral dari prediktor linier β′x seperti

dalam model regresi linier klasik. Dalam kondisi tertentu, hanya menerapkan OLS ke data dari

model indeks tunggal akan secara konsisten memperkirakan β hingga konstanta

proporsionalitas. [11]

Model linear hierarkis

Model linier hierarkis (atau regresi multilevel) mengatur data ke dalam hierarki regresi,

misalnya di mana A mengalami regresi pada B, dan B mengalami regresi pada C. Hal ini sering

digunakan di mana variabel yang diminati memiliki struktur hierarki alami seperti di statistik

pendidikan, di mana siswa bersarang di ruang kelas, ruang kelas bersarang di sekolah, dan

sekolah bersarang di beberapa pengelompokan administrasi, seperti distrik sekolah. Variabel


respon mungkin merupakan ukuran pencapaian siswa seperti skor tes, dan kovariat yang

berbeda akan dikumpulkan di tingkat kelas, sekolah, dan distrik sekolah.

Kesalahan-dalam-variabel

Model kesalahan-dalam-variabel (atau "model kesalahan pengukuran") memperluas model


regresi linier tradisional untuk memungkinkan variabel prediktor X diamati dengan

kesalahan. Kesalahan ini menyebabkan penaksir standar β menjadi bias. Secara umum, bentuk
bias adalah pelemahan, yang berarti bahwa efeknya bias ke nol.
Lainnya

Dalam teori Dempster-Shafer, atau fungsi kepercayaan linier khususnya, model regresi linier

dapat direpresentasikan sebagai matriks sapuan sebagian, yang dapat dikombinasikan dengan

matriks serupa yang mewakili pengamatan dan distribusi normal yang diasumsikan lainnya

serta persamaan keadaan. Kombinasi matriks tersapu atau tidak tersapu menyediakan metode

alternatif untuk memperkirakan model regresi linier.

Metode estimasi

Sejumlah besar prosedur telah dikembangkan untuk estimasi parameter dan inferensi dalam

regresi linier. Metode-metode ini berbeda dalam kesederhanaan komputasi algoritma,

keberadaan solusi bentuk tertutup, ketahanan terhadap distribusi berekor berat, dan asumsi

teoritis yang diperlukan untuk memvalidasi sifat statistik yang diinginkan seperti konsistensi

dan efisiensi asimptotik.

Beberapa teknik estimasi yang lebih umum untuk regresi linier dirangkum di bawah ini.

Estimasi kuadrat terkecil dan teknik terkait

Ilustrasi Francis Galton tahun 1875 tentang korelasi antara ketinggian orang dewasa dan orang

tua mereka. Pengamatan bahwa ketinggian anak-anak dewasa cenderung menyimpang kurang

dari tinggi rata-rata daripada orang tua mereka menyarankan konsep "regresi menuju rata-rata",
memberikan regresi namanya. "Lokus titik tangensial horizontal" melewati titik paling kiri dan

paling kanan pada elips (yang merupakan kurva level dari distribusi normal bivariat yang

diperkirakan dari data) adalah estimasi OLS dari regresi ketinggian orang tua pada ketinggian

anak-anak, sementara "lokus titik tangensial vertikal" adalah perkiraan OLS dari regresi

ketinggian anak-anak pada ketinggian orangtua. Sumbu utama elips adalah estimasi TLS.
Artikel utama: Linear least square

Metode linear kuadrat terkecil meliputi:


Kuadrat terkecil biasa

Kuadrat terkecil tertimbang

Kuadrat terkecil umum

Estimasi kemungkinan maksimum dan teknik terkait

Estimasi kemungkinan maksimum dapat dilakukan ketika distribusi istilah kesalahan diketahui

milik keluarga parametrik ƒθ tertentu dari distribusi probabilitas. [12] Ketika fθ adalah

distribusi normal dengan nol rata-rata dan varians θ, estimasi yang dihasilkan identik dengan

estimasi OLS. Estimasi GLS adalah estimasi kemungkinan maksimum ketika ε mengikuti

distribusi normal multivariat dengan matriks kovarian yang diketahui.

Regresi punggungan [13] [14] [15] dan bentuk-bentuk lain dari estimasi hukuman, seperti

regresi Lasso, [5] sengaja memasukkan bias ke dalam estimasi β untuk mengurangi variabilitas

estimasi. Perkiraan yang dihasilkan umumnya memiliki kesalahan kuadrat rata-rata lebih

rendah dari perkiraan OLS, terutama ketika multikolinieritas hadir atau ketika overfitting

adalah masalah. Mereka umumnya digunakan ketika tujuannya adalah untuk memprediksi nilai

variabel respon y untuk nilai-nilai prediktor x yang belum diamati. Metode-metode ini tidak

seperti yang biasa digunakan ketika tujuannya adalah inferensi, karena sulit untuk

memperhitungkan bias.

Regresi minimum absolut (LAD) adalah teknik estimasi kuat karena kurang sensitif terhadap

kehadiran outlier daripada OLS (tetapi kurang efisien daripada OLS ketika tidak ada outlier

yang hadir). Ini setara dengan estimasi kemungkinan maksimum berdasarkan model distribusi

Laplace untuk ε. [16]


Estimasi adaptif. Jika kita mengasumsikan bahwa istilah kesalahan tidak tergantung pada

regressor, {\ displaystyle \ varepsilon _ {i} \ perp \ mathbf {x} _ {i}} \ varepsilon _ {i} \ perp

\ mathbf {x} _ {i} , maka estimator optimal adalah 2-langkah MLE, di mana langkah pertama

digunakan untuk memperkirakan distribusi kesalahan istilah non-parametrik. [17]

Teknik estimasi lainnya

Perbandingan estimator Theil-Sen (hitam) dan regresi linier sederhana (biru) untuk satu set
poin dengan outlier.
Regresi linier Bayesian menerapkan kerangka kerja statistik Bayesian terhadap regresi

linier. (Lihat juga regresi linear multivariat Bayesian.) Secara khusus, koefisien regresi β

diasumsikan sebagai variabel acak dengan distribusi sebelumnya yang ditentukan. Distribusi

sebelumnya dapat bias solusi untuk koefisien regresi, dengan cara yang mirip dengan (tetapi

lebih umum daripada) regresi ridge atau regresi laso. Selain itu, proses estimasi Bayesian

menghasilkan bukan hanya satu titik estimasi untuk nilai "terbaik" dari koefisien regresi tetapi

seluruh distribusi posterior, sepenuhnya menggambarkan ketidakpastian seputar kuantitas. Ini

dapat digunakan untuk memperkirakan koefisien "terbaik" menggunakan mean, mode, median,

semua kuantil (lihat regresi kuantil), atau fungsi lain dari distribusi posterior.

Regresi kuantil berfokus pada kuantil kondisional y yang diberikan X daripada rata-rata

kondisional y yang diberikan X. Regresi kuantil linier memodelkan kuantil kondisional

tertentu, misalnya median kondisional, sebagai fungsi linear βTx dari prediktor.

Model campuran banyak digunakan untuk menganalisis hubungan regresi linier yang

melibatkan data dependen ketika dependensi memiliki struktur yang diketahui. Aplikasi umum

dari model campuran meliputi analisis data yang melibatkan pengukuran berulang, seperti data

longitudinal, atau data yang diperoleh dari cluster sampling. Mereka umumnya cocok sebagai

model parametrik, menggunakan kemungkinan maksimum atau estimasi Bayesian. Dalam

kasus di mana kesalahan dimodelkan sebagai variabel acak normal, ada hubungan yang erat

antara model campuran dan kuadrat terkecil umum. [18] Estimasi efek tetap adalah pendekatan

alternatif untuk menganalisis jenis data ini.

Regresi komponen utama (PCR) [7] [8] digunakan ketika jumlah variabel prediktor besar, atau
ketika korelasi kuat ada di antara variabel prediktor. Prosedur dua tahap ini pertama-tama

mengurangi variabel prediktor menggunakan analisis komponen utama kemudian

menggunakan variabel yang dikurangi dalam kecocokan regresi OLS. Meskipun sering bekerja

dengan baik dalam praktiknya, tidak ada alasan teoritis umum bahwa fungsi linear paling

informatif dari variabel prediktor harus terletak di antara komponen utama yang dominan dari
distribusi multivariat dari variabel prediktor. Regresi kuadrat terkecil parsial adalah perluasan

metode PCR yang tidak menderita kekurangan yang disebutkan.


Regresi sudut terkecil [6] adalah prosedur estimasi untuk model regresi linier yang

dikembangkan untuk menangani vektor kovariat dimensi tinggi, berpotensi dengan lebih

banyak kovariat daripada pengamatan.

Estimator Theil-Sen adalah teknik estimasi kuat sederhana yang memilih kemiringan garis fit

untuk menjadi median dari kemiringan garis melalui pasangan titik sampel. Ini memiliki sifat

efisiensi statistik yang mirip dengan regresi linier sederhana tetapi jauh lebih sensitif terhadap

pencilan. [19]

Teknik estimasi kuat lainnya, termasuk pendekatan mean terpangkas α [rujukan?], Dan L-, M-

, S-, dan R-estimator telah diperkenalkan. [Rujukan?]

Aplikasi

Lihat juga: Linear least square § Aplikasi

Regresi linier banyak digunakan dalam ilmu biologi, perilaku dan sosial untuk menggambarkan

kemungkinan hubungan antar variabel. Ini peringkat sebagai salah satu alat paling penting yang

digunakan dalam disiplin ilmu ini.

Garis tren

Artikel utama: Estimasi tren

Garis tren mewakili tren, pergerakan jangka panjang dalam data deret waktu setelah komponen

lainnya diperhitungkan. Ini memberitahu apakah kumpulan data tertentu (katakanlah PDB,

harga minyak atau harga saham) telah meningkat atau menurun selama periode waktu

tertentu. Garis tren dapat dengan mudah ditarik melalui serangkaian titik data, tetapi lebih tepat
posisi dan kemiringannya dihitung menggunakan teknik statistik seperti regresi linier. Garis

tren biasanya adalah garis lurus, meskipun beberapa variasi menggunakan polinomial tingkat

tinggi tergantung pada tingkat kelengkungan yang diinginkan dalam garis tersebut.

Garis tren terkadang digunakan dalam analitik bisnis untuk menunjukkan perubahan data
seiring waktu. Ini memiliki keuntungan karena sederhana. Garis tren sering digunakan untuk

menyatakan bahwa tindakan atau peristiwa tertentu (seperti pelatihan, atau kampanye iklan)
menyebabkan perubahan yang diamati pada suatu titik waktu. Ini adalah teknik sederhana, dan
tidak memerlukan kelompok kontrol, desain eksperimental, atau teknik analisis yang

canggih. Namun, itu menderita dari kurangnya validitas ilmiah dalam kasus di mana perubahan

potensial lainnya dapat mempengaruhi data.

Epidemiologi

Bukti awal terkait merokok tembakau dengan mortalitas dan morbiditas berasal dari studi

observasional menggunakan analisis regresi. Untuk mengurangi korelasi palsu ketika

menganalisis data pengamatan, peneliti biasanya memasukkan beberapa variabel dalam model

regresi mereka di samping variabel minat utama. Misalnya, dalam model regresi di mana

merokok merupakan variabel independen yang menjadi perhatian utama dan variabel dependen

adalah umur yang diukur dalam tahun, para peneliti dapat memasukkan pendidikan dan

pendapatan sebagai variabel independen tambahan, untuk memastikan bahwa setiap efek yang

diamati dari merokok pada umur adalah bukan karena faktor-faktor sosial ekonomi

lainnya. Namun, tidak pernah mungkin untuk memasukkan semua variabel pengganggu yang

mungkin dalam analisis empiris. Misalnya, gen hipotetis dapat meningkatkan angka kematian

dan juga menyebabkan orang lebih banyak merokok. Untuk alasan ini, uji coba terkontrol

secara acak seringkali dapat menghasilkan bukti yang lebih kuat dari hubungan kausal daripada

yang bisa diperoleh dengan menggunakan analisis regresi data pengamatan. Ketika eksperimen

terkontrol tidak layak, varian analisis regresi seperti variabel instrumental dapat digunakan

untuk mencoba memperkirakan hubungan sebab akibat dari data pengamatan.

Keuangan

Model penentuan harga aset modal menggunakan regresi linier serta konsep beta untuk

menganalisis dan mengukur risiko sistematis suatu investasi. Ini datang langsung dari koefisien

beta dari model regresi linier yang menghubungkan pengembalian investasi dengan

pengembalian semua aset berisiko.

Ekonomi
Artikel utama: Ekonometrika
Regresi linier adalah alat empiris yang dominan dalam bidang ekonomi. Misalnya, digunakan

untuk memprediksi pengeluaran konsumsi, [20] pengeluaran investasi tetap, investasi

persediaan, pembelian ekspor suatu negara, [21] pengeluaran untuk impor, [21] permintaan

untuk memegang aset likuid, [22] permintaan tenaga kerja, [23] dan pasokan tenaga kerja. [23]

Ilmu lingkungan

[ikon]

Bagian ini membutuhkan ekspansi. Anda dapat membantu dengan menambahkannya. (Januari

2010)

Regresi linier menemukan aplikasi dalam berbagai aplikasi ilmu lingkungan. Di Kanada,

Program Pemantauan Efek Lingkungan menggunakan analisis statistik pada ikan dan survei

bentik untuk mengukur efek dari pabrik pulp atau limbah tambang logam pada ekosistem

perairan. [24]

Pembelajaran mesin

Regresi linier memainkan peran penting dalam bidang kecerdasan buatan seperti pembelajaran

mesin. Algoritma regresi linier adalah salah satu algoritma pembelajaran mesin yang diawasi

karena kesederhanaannya dan sifat-sifatnya yang terkenal. [25]

Sejarah

Regresi linear kuadrat terkecil, sebagai sarana untuk menemukan kesesuaian linear kasar yang
baik dengan sekumpulan poin dilakukan oleh Legendre (1805) dan Gauss (1809) untuk

prediksi pergerakan planet. Quetelet bertanggung jawab untuk membuat prosedur ini terkenal

dan menggunakannya secara luas dalam ilmu sosial. [26]

Lihat juga
ikon Portal statistik

Analisis varian
Dekomposisi Blinder – Oaxaca
Model regresi yang disensor

Regresi cross-sectional

Kurva pas

Metode empiris Bayes

Kesalahan dan residu

Jumlah kotak yang tidak sesuai

Pemasangan garis

Klasifikasi linier

Persamaan linier

Regresi logistik

M-estimator

Splines regresi adaptif multivariat

Regresi nonlinier

Regresi nonparametrik

Persamaan normal

Regresi pengejaran proyeksi

Regresi linier tersegmentasi

Regresi bertahap

Istirahat struktural

Mesin dukungan vektor

Model regresi terpotong


Referensi

Kutipan

David A. Freedman (2009). Model Statistik: Teori dan Praktek. Cambridge University

Press. hal. 26. Persamaan regresi sederhana memiliki di sisi kanan sebuah intersep dan variabel

penjelas dengan koefisien kemiringan. Persamaan regresi berganda memiliki dua atau lebih
variabel penjelas di sisi kanan, masing-masing dengan koefisien kemiringan sendiri
Rencher, Alvin C .; Christensen, William F. (2012), "Bab 10, Regresi multivariat - Bagian

10.1, Pendahuluan", Metode Analisis Multivariat, Seri Wiley dalam Probabilitas dan Statistik,

709 (edisi ketiga), John Wiley & Sons, p. 19, ISBN 9781118391679.

Hilary L. Seal (1967). "Perkembangan historis model linear Gauss". Biometrika. 54 (1/2): 1–

24. doi: 10.1093 / biomet / 54.1-2.1. JSTOR 2333849.

Yan, Xin (2009), Analisis Regresi Linier: Teori dan Komputasi, World Scientific, hlm. 1–2,

ISBN 9789812834119, Analisis regresi ... mungkin merupakan salah satu topik tertua dalam

statistik matematika sejak sekitar dua ratus tahun yang lalu . Bentuk paling awal dari regresi

linier adalah metode kuadrat terkecil, yang diterbitkan oleh Legendre pada tahun 1805, dan

oleh Gauss pada tahun 1809 ... Legendre dan Gauss keduanya menerapkan metode ini pada

masalah penentuan, dari pengamatan astronomi, orbit tubuh. tentang matahari.

Tibshirani, Robert (1996). "Penyusutan dan Pemilihan Regresi melalui Lasso". Jurnal

Masyarakat Statistik Kerajaan, Seri B. 58 (1): 267–288. JSTOR 2346178.

Efron, Bradley; Hastie, Trevor; Johnstone, Iain; Tibshirani, Robert (2004). "Regresi Sudut

Paling Sedikit". The Annals of Statistics. 32 (2): 407–451. arXiv: matematika / 0406456. doi:

10.1214 / 009053604000000067. JSTOR 3448465.

Hawkins, Douglas M. (1973). "Tentang Investigasi Regresi Alternatif oleh Analisis Komponen

Utama". Jurnal Masyarakat Statistik Kerajaan, Seri C. 22 (3): 275–286. JSTOR 2346776.

Jolliffe, Ian T. (1982). "Catatan tentang Penggunaan Komponen Utama dalam Regresi". Jurnal

Masyarakat Statistik Kerajaan, Seri C. 31 (3): 300–303. JSTOR 2348005.

Berk, Richard A. (2007). "Analisis Regresi: Kritik Konstruktif". Tinjauan Keadilan Pidana. 32
(3): 301–302. doi: 10.1177 / 0734016807304871.

Warne, Russell T. (2011). "Melampaui regresi berganda: Menggunakan analisis kesamaan

untuk lebih memahami hasil R2". Triwulan Anak Berbakat. 55 (4): 313–318. doi: 10.1177 /

0016986211422217.

Brillinger, David R. (1977). "Identifikasi Sistem Seri Waktu Nonlinier


Tertentu". Biometrika. 64 (3): 509–515. doi: 10.1093 / biomet / 64.3.509. JSTOR 2345326.
Lange, Kenneth L .; Sedikit, Roderick JA; Taylor, Jeremy MG (1989). "Pemodelan Statistik

yang Kuat Menggunakan t Distribusi" (PDF). Jurnal Asosiasi Statistik Amerika. 84 (408):

881–896. doi: 10.2307 / 2290063. JSTOR 2290063.

Swindel, Benee F. (1981). "Geometry of Ridge Regression Illustrated". Ahli Statistik

Amerika. 35 (1): 12–15. doi: 10.2307 / 2683577. JSTOR 2683577.

Draper, Norman R .; van Nostrand; R. Craig (1979). "Regresi Ridge dan Estimasi James-Stein:

Ulasan dan Komentar". Technometrics. 21 (4): 451–466. doi: 10.2307 / 1268284. JSTOR

1268284.

Hoerl, Arthur E .; Kennard, Robert W .; Hoerl, Roger W. (1985). "Penggunaan Praktis Regresi

Punggung: Sebuah Tantangan Ditemui". Jurnal Masyarakat Statistik Kerajaan, Seri C. 34 (2):

114–120. JSTOR 2347363.

Narula, Subhash C .; Wellington, John F. (1982). "Jumlah Minimum Regresi Kesalahan

Mutlak: Survei Keadaan Mutakhir". Tinjauan Statistik Internasional. 50 (3): 317–326. doi:

10.2307 / 1402501. JSTOR 1402501.

Stone, CJ (1975). + Msgstr "Penduga kemungkinan maksimum adaptif dari parameter

lokasi". The Annals of Statistics. 3 (2): 267–284. doi: 10.1214 / aos / 1176343056. JSTOR

2958945.

Goldstein, H. (1986). "Analisis Multilevel Mixed Linear Model Menggunakan Iterative

Generalized Least Squares". Biometrika. 73 (1): 43–56. doi: 10.1093 / biomet /

73.1.43. JSTOR 2336270.

Theil, H. (1950). "Metode analisis regresi linear dan polinomial peringkat-invarian. I, II,
III". Nederl. Akad. Wetensch., Proc. 53: 386–392, 521–525, 1397–1412. MR 0036489; Sen,

Pranab Kumar (1968). "Perkiraan koefisien regresi berdasarkan pada Kendall's tau". Jurnal

Asosiasi Statistik Amerika. 63 (324): 1379–1389. doi: 10.2307 / 2285891. JSTOR 2285891.

MR 0258201.

Deaton, Angus (1992). Memahami Konsumsi. Oxford University Press. ISBN 978-0-19-
828824-4.

Krugman, Paul R .; Obstfeld, M .; Melitz, Marc J. (2012). Ekonomi Internasional: Teori dan
Kebijakan (edisi ke-9 global). Harlow: Pearson. ISBN 9780273754091.
Laidler, David EW (1993). Permintaan Uang: Teori, Bukti, dan Masalah (edisi ke-4). New

York: Harper Collins. ISBN 978-0065010985.

Ehrenberg; Smith (2008). Ekonomi Perburuhan Modern (edisi internasional ke-10). London:

Addison-Wesley. ISBN 9780321538963.

Halaman web EEMP Diarsipkan 2011-06-11 di Wayback Machine

"Regresi Linier (Pembelajaran Mesin)" (PDF). Universitas Pittsburgh.

Stigler, Stephen M. (1986). Sejarah Statistik: Pengukuran Ketidakpastian sebelum 1900.

Cambridge: Harvard. ISBN 0-674-40340-1.

Sumber

Cohen, J., Cohen P., West, SG, & Aiken, LS (2003). Analisis regresi / korelasi berganda

diterapkan untuk ilmu perilaku. (2nd ed.) Hillsdale, NJ: Lawrence Erlbaum Associates

Charles Darwin. Variasi Hewan dan Tumbuhan di Bawah Domestikasi. (1868) (Bab XIII

menjelaskan apa yang diketahui tentang pembalikan pada zaman Galton. Darwin

menggunakan istilah "pembalikan".)

Draper, NR; Smith, H. (1998). Analisis Regresi Terapan (edisi ke-3). John Wiley. ISBN 978-

0-471-17082-2.

Francis Galton. "Regresi Menuju Mediokritas dalam Perawakan Turunan," Jurnal Institut

Antropologi, 15: 246-263 (1886). (Faksimili di: [1])

Robert S. Pindyck dan Daniel L. Rubinfeld (1998, edisi 4 jam). Model Ekonometrik dan

Prakiraan Ekonomi, ch. 1 (Pendahuluan, termasuk lampiran pada & operator & derivasi

parameter est.) & Lampiran 4.3 (mult. Regresi dalam bentuk matriks).
Bacaan lebih lanjut

Pedhazur, Elazar J (1982). Regresi berganda dalam penelitian perilaku: Penjelasan dan prediksi

(edisi kedua). New York: Holt, Rinehart dan Winston. ISBN 978-0-03-041760-3.

Mathieu Rouaud, 2013: Probabilitas, Statistik dan Estimasi Bab 2: Regresi Linier, Regresi

Linier dengan Bar Kesalahan dan Regresi Nonlinear.


Laboratorium Fisik Nasional (1961). "Bab 1: Persamaan Linear dan Matriks: Metode

Langsung". Metode Komputasi Modern. Catatan tentang Sains Terapan. 16 (2nd ed.). Kantor
Alat Tulis Yang Mulia

S-ar putea să vă placă și