bracket.prod | R Documentation |
Bracket product of a matrix and a 3-dimensional array.
bracket.prod(a, x)
a |
a numeric matrix. |
x |
a three-dimensional array. |
Let \bold{X} = (x_{tij})
be a 3-dimensional n\times p\times q
array and
\bold{A}
an m\times n
matrix, then \bold{Y} = [\bold{A}][\bold{X}]
is called the bracket product of \bold{A}
and \bold{X}
, that is an m
\times p\times q
with elements
y_{tij} = \sum\limits_{k=1}^n a_{tk}x_{kij}
bracket.prod
returns a 3-dimensional array of dimension m\times p\times q
.
Wei, B.C. (1998). Exponential Family Nonlinear Models. Springer, New York.
array
, matrix
, array.mult
.
x <- array(0, dim = c(2,3,3)) # 2 x 3 x 3 array
x[,,1] <- c(1,2,2,4,3,6)
x[,,2] <- c(2,4,4,8,6,12)
x[,,3] <- c(3,6,6,12,9,18)
a <- matrix(1, nrow = 3, ncol = 2)
y <- bracket.prod(a, x) # a 3 x 3 x 3 array
y
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.