This function creates the difference operator matrix delta
for
subtracting a matrix row from the other matrix rows.
Arguments
- J
The number of matrix rows.
- i
The row number to which respect differences are computed.
Value
A matrix with J-1
rows.
Details
Given a matrix x
with J
rows, then delta(i,J) %*% x
computes differences with respect to row i
.
Examples
J <- 2
x <- matrix(1, nrow = J, ncol = 2)
RprobitB:::delta(J, 1) %*% x
#> [,1] [,2]
#> [1,] 0 0