checkAdequation: Function to Check the Adequation of the Second Derivatives

Description Usage Arguments Value Author(s) References See Also Examples

Description

Check the adequation of the second derivatives (hessian) for computation of variance and covariance. Use inside the function m4plEstimateMore to assure that computations can be applied to this second derivative. Problems encountered can be of not positive definitetess, singular matrix, diagonal not complitely positive. In these cases inversion of the matrix is not posssible or variances cannot be computed from the inverse of the diagonal.

Usage

1

Arguments

x

matrix: second derivative (hessian).

Value

isNumbers

logical: check if the elements of the x matrix are all numerics.

correctClass

logical: check if the the x matrix is of class matrix.

squareMatrix

logical: check if the the x matrix is square.

diagPositive

logical: check if the elements of the x matrix are all positive and > 0.

positiveDefinite

logical: check if the the x matrix is positiveDefinite.

nonSingular

logical: check if the the x matrix is nonSingular.

Author(s)

Gilles Raiche, Universite du Quebec a Montreal (UQAM),

Departement d'education et pedagogie

Raiche.Gilles@uqam.ca, http://www.er.uqam.ca/nobel/r17165/

References

Seber, G. E. A. F. (2008). A matrix handbook for statisticians. New York, New Jersey: Wiley.

See Also

eigen, det, diag

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
## Complete adequation of the matrix
## ..........................................................
 x <- matrix(c(4.867054, 16.66902, 16.669023, 107.36390), ncol=2)
 checkAdequation(x)
 all(checkAdequation(x))
 eigen(x)$values
 det(x)
 diag(x)
## ..........................................................

## Not positiveDefinite matrix
## ..........................................................
 x <- matrix(1:4, ncol=2)
 checkAdequation(x)
 all(checkAdequation(x))
 eigen(x)$values
 det(x)
 diag(x)
## ..........................................................

## More problems
## ..........................................................
 x <- matrix(c("Inf",2,5,10), ncol=2)
 checkAdequation(x)
 all(checkAdequation(x))
 det(x)
 diag(x)
# eigen(x)$values
 x <- matrix(c("NaN",2,5,10), ncol=2)
 checkAdequation(x)
 all(checkAdequation(x))
 det(x)
 diag(x)
# eigen(x)$values
## ..........................................................

irtProb documentation built on May 2, 2019, 1:30 p.m.