Drank {extRC} | R Documentation |
Check matrix rank
Description
Given the row vectorized matrix, it computes the vector of discrepancies with respect to a certain rank and its derivative.
Usage
Drank(ga, lev, k, der = FALSE)
Arguments
ga |
row vectorized matrix of interaction |
lev |
vector of the number of row and column categories in the original table (the numbers of rows and columns of the input matrix must be increased by 1) |
k |
matrix rank |
der |
to require derivative |
Value
fr |
vector of discrepancies with respect to the rank |
Dfr |
derivative of fr |
References
Bartolucci, F. and Forcina, A. (2002). Extended RC association models allowing for order restrictions and marginal modeling. Journal of the American Statistical Association, 97, 1192-1199.
Examples
A = matrix(rnorm(12),4) # matrix the rank of which must be checked
a = as.vector(t(A))
out = Drank(a,c(5,4),1,der=TRUE)
(out$fr)
(out$Dfr)
[Package extRC version 1.2 Index]