View source: R/is.idempotent.matrix.R
is.idempotent.matrix | R Documentation |
This function returns a TRUE
value if the square matrix argument x
is idempotent, that is, the product of the matrix with itself is the matrix.
The equality test is performed to within the specified tolerance level. If
the matrix is not idempotent, then a FALSE
value is returned.
is.idempotent.matrix(x, tol = 1e-08)
x |
a numeric square matrix |
tol |
a numeric tolerance level usually left out |
Idempotent matrices are used in econometric analysis. Consider the problem of estimating the regression parameters of a standard linear model {\bf{y}} = {\bf{X}}\;{\bf{β }} + {\bf{e}} using the method of least squares. {\bf{y}} is an order m random vector of dependent variables. {\bf{X}} is an m \times n matrix whose columns are columns of observations on one of the n - 1 independent variables. The first column contains m ones. {\bf{e}} is an order m random vector of zero mean residual values. {\bf{β }} is the order n vector of regression parameters. The objective function that is minimized in the method of least squares is ≤ft( {{\bf{y}} - {\bf{X}}\;{\bf{β }}} \right)^\prime ≤ft( {{\bf{y}} - {\bf{X}}\;{\bf{β }}} \right). The solution to ths quadratic programming problem is {\bf{\hat β }} = ≤ft[ {≤ft( {{\bf{X'}}\;{\bf{X}}} \right)^{ - 1} \;{\bf{X'}}} \right]\;{\bf{y}} The corresponding estimator for the residual vector is {\bf{\hat e}} = {\bf{y}} - {\bf{X}}\;{\bf{\hat β }} = ≤ft[ {{\bf{I}} - {\bf{X}}\;≤ft( {{\bf{X'}}\;{\bf{X}}} \right)^{ - 1} {\bf{X'}}} \right]{\bf{y}} = {\bf{M}}\;{\bf{y}}. {\bf{M}} and {{\bf{X}}\;≤ft( {{\bf{X'}}\;{\bf{X}}} \right)^{ - 1} {\bf{X'}}} are idempotent. Idempotency of {\bf{M}} enters into the estimation of the variance of the estimator.
A TRUE or FALSE value.
Frederick Novomestky fnovomes@poly.edu
Bellman, R. (1987). Matrix Analysis, Second edition, Classics in Applied Mathematics, Society for Industrial and Applied Mathematics.
Chang, A. C., (1984). Fundamental Methods of Mathematical Economics, Third edition, McGraw-Hill.
Green, W. H. (2003). Econometric Analysis, Fifth edition, Prentice-Hall.
Horn, R. A. and C. R. Johnson (1990). Matrix Analysis, Cambridge University Press.
A <- diag( 1, 3 ) is.idempotent.matrix( A ) B <- matrix( c( 1, 2, 3, 4 ), nrow=2, byrow=TRUE ) is.idempotent.matrix( B ) C <- matrix( c( 1, 0, 0, 0 ), nrow=2, byrow=TRUE ) is.idempotent.matrix( C )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.