Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Design matrix

From Wikipedia, the free encyclopedia
Matrix of values of explanatory variables

Instatistics and in particular inregression analysis, adesign matrix, also known asmodel matrix orregressor matrix and often denoted byX, is amatrix of values ofexplanatory variables of a set of objects. Each row represents an individual object, with the successive columns corresponding to the variables and their specific values for that object. The design matrix is used in certainstatistical models, e.g., thegeneral linear model.[1][2][3] It can containindicator variables (ones and zeros) that indicate group membership in anANOVA, or it can contain values ofcontinuous variables.

The design matrix contains data on theindependent variables (also called explanatory variables), in a statistical model that is intended to explain observed data on a response variable (often called adependent variable). The theory relating to such models uses the design matrix as input to somelinear algebra : see for examplelinear regression. A notable feature of the concept of a design matrix is that it is able to represent a number of differentexperimental designs and statistical models, e.g.,ANOVA,ANCOVA, and linear regression.[citation needed]

Definition

[edit]

The design matrix is defined to be a matrixX{\displaystyle X} such thatXij{\displaystyle X_{ij}} (thejth column of theith row ofX{\displaystyle X}) represents the value of thejth variable associated with theith object.

A regression model may be represented via matrix multiplication as

y=Xβ+e,{\displaystyle y=X\beta +e,}

whereX is the design matrix,β{\displaystyle \beta } is a vector of the model's coefficients (one for each variable),e{\displaystyle e} is a vector of random errors with mean zero, andy is the vector of predicted outputs for each object.

Size

[edit]

The design matrix has dimensionn-by-p, wheren is the number of samples observed, andp is the number of variables (features) measured in all samples.[4][5]

In this representation different rows typically represent different repetitions of an experiment, while columns represent different types of data (say, the results from particular probes). For example, suppose an experiment is run where 10 people are pulled off the street and asked 4 questions. The data matrixM would be a 10×4 matrix (meaning 10 rows and 4 columns). The datum in rowi and columnj of this matrix would be the answer of theith person to thejth question.

Examples

[edit]

Arithmetic mean

[edit]

The design matrix for anarithmetic mean is acolumnvector of ones.

Simple linear regression

[edit]

This section gives an example ofsimple linear regression—that is, regression with only a single explanatory variable—with seven observations.The seven data points are {yi,xi}, fori = 1, 2, …, 7. The simple linear regression model is

yi=β0+β1xi+εi,{\displaystyle y_{i}=\beta _{0}+\beta _{1}x_{i}+\varepsilon _{i},\,}

whereβ0{\displaystyle \beta _{0}} is they-intercept andβ1{\displaystyle \beta _{1}} is the slope of the regression line. This model can be represented in matrix form as

[y1y2y3y4y5y6y7]=[1x11x21x31x41x51x61x7][β0β1]+[ε1ε2ε3ε4ε5ε6ε7]{\displaystyle {\begin{bmatrix}y_{1}\\y_{2}\\y_{3}\\y_{4}\\y_{5}\\y_{6}\\y_{7}\end{bmatrix}}={\begin{bmatrix}1&x_{1}\\1&x_{2}\\1&x_{3}\\1&x_{4}\\1&x_{5}\\1&x_{6}\\1&x_{7}\end{bmatrix}}{\begin{bmatrix}\beta _{0}\\\beta _{1}\end{bmatrix}}+{\begin{bmatrix}\varepsilon _{1}\\\varepsilon _{2}\\\varepsilon _{3}\\\varepsilon _{4}\\\varepsilon _{5}\\\varepsilon _{6}\\\varepsilon _{7}\end{bmatrix}}}

where the first column of 1s in the design matrix allows estimation of they-intercept while the second column contains thex-values associated with the correspondingy-values. The matrix whose columns are 1's andx's in this example is the design matrix.

Multiple regression

[edit]

This section contains an example ofmultiple regression with two covariates (explanatory variables):w andx.Again suppose that the data consist of seven observations, and that for each observed value to be predicted (yi{\displaystyle y_{i}}), valueswi andxi of the two covariates are also observed. The model to be considered is

yi=β0+β1wi+β2xi+εi{\displaystyle y_{i}=\beta _{0}+\beta _{1}w_{i}+\beta _{2}x_{i}+\varepsilon _{i}}

This model can be written in matrix terms as

[y1y2y3y4y5y6y7]=[1w1x11w2x21w3x31w4x41w5x51w6x61w7x7][β0β1β2]+[ε1ε2ε3ε4ε5ε6ε7]{\displaystyle {\begin{bmatrix}y_{1}\\y_{2}\\y_{3}\\y_{4}\\y_{5}\\y_{6}\\y_{7}\end{bmatrix}}={\begin{bmatrix}1&w_{1}&x_{1}\\1&w_{2}&x_{2}\\1&w_{3}&x_{3}\\1&w_{4}&x_{4}\\1&w_{5}&x_{5}\\1&w_{6}&x_{6}\\1&w_{7}&x_{7}\end{bmatrix}}{\begin{bmatrix}\beta _{0}\\\beta _{1}\\\beta _{2}\end{bmatrix}}+{\begin{bmatrix}\varepsilon _{1}\\\varepsilon _{2}\\\varepsilon _{3}\\\varepsilon _{4}\\\varepsilon _{5}\\\varepsilon _{6}\\\varepsilon _{7}\end{bmatrix}}}

Here the 7×3 matrix on the right side is the design matrix.

One-way ANOVA (cell means model)

[edit]

This section contains an example with a one-way analysis of variance (ANOVA) with three groups and seven observations. The given data set has the first three observations belonging to the first group, the following two observations belonging to the second group and the final two observations belonging to the third group.If the model to be fit is just the mean of each group, then the model is

yij=μi+εij{\displaystyle y_{ij}=\mu _{i}+\varepsilon _{ij}}

which can be written

[y1y2y3y4y5y6y7]=[100100100010010001001][μ1μ2μ3]+[ε1ε2ε3ε4ε5ε6ε7]{\displaystyle {\begin{bmatrix}y_{1}\\y_{2}\\y_{3}\\y_{4}\\y_{5}\\y_{6}\\y_{7}\end{bmatrix}}={\begin{bmatrix}1&0&0\\1&0&0\\1&0&0\\0&1&0\\0&1&0\\0&0&1\\0&0&1\end{bmatrix}}{\begin{bmatrix}\mu _{1}\\\mu _{2}\\\mu _{3}\end{bmatrix}}+{\begin{bmatrix}\varepsilon _{1}\\\varepsilon _{2}\\\varepsilon _{3}\\\varepsilon _{4}\\\varepsilon _{5}\\\varepsilon _{6}\\\varepsilon _{7}\end{bmatrix}}}

In this modelμi{\displaystyle \mu _{i}} represents the mean of thei{\displaystyle i}th group.

One-way ANOVA (offset from reference group)

[edit]

The ANOVA model could be equivalently written as each group parameterτi{\displaystyle \tau _{i}} being an offset from some overall reference. Typically this reference point is taken to be one of the groups under consideration. This makes sense in the context of comparing multiple treatment groups to a control group and the control group is considered the "reference". In this example, group 1 was chosen to be the reference group. As such the model to be fit is

yij=μ+τi+εij{\displaystyle y_{ij}=\mu +\tau _{i}+\varepsilon _{ij}}

with the constraint thatτ1{\displaystyle \tau _{1}} is zero.

[y1y2y3y4y5y6y7]=[100100100110110101101][μτ2τ3]+[ε1ε2ε3ε4ε5ε6ε7]{\displaystyle {\begin{bmatrix}y_{1}\\y_{2}\\y_{3}\\y_{4}\\y_{5}\\y_{6}\\y_{7}\end{bmatrix}}={\begin{bmatrix}1&0&0\\1&0&0\\1&0&0\\1&1&0\\1&1&0\\1&0&1\\1&0&1\end{bmatrix}}{\begin{bmatrix}\mu \\\tau _{2}\\\tau _{3}\end{bmatrix}}+{\begin{bmatrix}\varepsilon _{1}\\\varepsilon _{2}\\\varepsilon _{3}\\\varepsilon _{4}\\\varepsilon _{5}\\\varepsilon _{6}\\\varepsilon _{7}\end{bmatrix}}}

In this modelμ{\displaystyle \mu } is the mean of the reference group andτi{\displaystyle \tau _{i}} is the difference from groupi{\displaystyle i} to the reference group.τ1{\displaystyle \tau _{1}} is not included in the matrix because its difference from the reference group (itself) is necessarily zero.

See also

[edit]

References

[edit]
  1. ^Everitt, B. S. (2002).Cambridge Dictionary of Statistics (2nd ed.). Cambridge, UK: Cambridge University Press.ISBN 0-521-81099-X.
  2. ^Box, G. E. P.;Tiao, G. C. (1992) [1973].Bayesian Inference in Statistical Analysis. New York: John Wiley and Sons.ISBN 0-471-57428-7. (Section 8.1.1)
  3. ^Timm, Neil H. (2007).Applied Multivariate Analysis. Springer Science & Business Media. p. 107.ISBN 9780387227719.
  4. ^Johnson, Richard A; Wichern, Dean W (2001).Applied Multivariate Statistical Analysis. Pearson. pp. 111–112.ISBN 0131877151.
  5. ^"Basic Concepts for Multivariate Statistics p.2"(PDF). SAS Institute.

Further reading

[edit]
  • Verbeek, Albert (1984). "The Geometry of Model Selection in Regression". In Dijkstra, Theo K. (ed.).Misspecification Analysis. New York: Springer. pp. 20–36.ISBN 0-387-13893-5.
Matrix classes
Explicitly constrained entries
Constant
Conditions oneigenvalues or eigenvectors
Satisfying conditions onproducts orinverses
With specific applications
Used instatistics
Used ingraph theory
Used in science and engineering
Related terms
Retrieved from "https://en.wikipedia.org/w/index.php?title=Design_matrix&oldid=1285634324"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2026 Movatter.jp