dae (version 3.1-23)

is.projector: Tests whether an object is a valid object of class projector

Description

Tests whether an object is a valid object of class "projector".

Usage

is.projector(object)

Arguments

object

The matrix to be made into a projector.

Value

TRUE or FALSE depending on whether the object is a valid object of class "projector".

Warning

The degrees of freedom are not checked. correct.degfree can be used to check them.

Details

The function is.projector tests whether the object consists of a matrix that is square, symmetric and idempotent. In checking symmetry and idempotency, the equality of the matrix with either its transpose or square is tested. In this, a difference in elements is considered to be zero if it is less than daeTolerance, which is initially set to .Machine$double.eps ^ 0.5 (about 1.5E-08). The function set.daeTolerance can be used to change daeTolerance.

See Also

projector, correct.degfree in package dae.

projector for further information about this class.

Examples

Run this code
# NOT RUN {
## set up a 2 x 2 mean operator that takes the mean of a vector of 2 values
m <- matrix(rep(0.5,4), nrow=2)

## create an object of class projector
proj.m <- projector(m)

## check that it is a valid projector
is.projector(proj.m)
# }

Run the code above in your browser using DataLab