calc.mu.B {SpatioTemporal} | R Documentation |
Computes either the product between a block diagonal, square matrix
iS
and a block matrix X
; the quadratic form of a block
diagonal, square matrix, t(X)*iS*X
; or a block matrix multiplied by a
vector, X*alpha
.
calc.mu.B(X, alpha) calc.iS.X(X, iS) calc.X.iS.X(X, iS.X)
X |
A list of |
alpha |
A list of |
iS |
A block diagonal, square matrix, with |
iS.X |
Matrix containing the product of |
matrix containing iS*X, X'*iS*X, or X*alpha.
Johan Lindstrom and Adam Szpiro
Other likelihood utility functions: loglikeSTdim
,
loglikeSTgetPars
,
loglikeSTnames
Other block matrix functions: blockMult
,
calc.FXtF2
, calc.FX
,
calc.tFXF
, calc.tFX
,
makeCholBlock
, makeSigmaB
,
makeSigmaNu
## Create a block diagonal matrix, ... iS <- rbind(c(2,1,0,0), c(1,3,0,0), c(0,0,3,2), c(0,0,2,4)) ## ... a block matrix ... X <- list(matrix(c(1,2)), matrix(c(2,2,3,4),2,2)) ## ... with alternative form, ... Xt <- rbind(cbind(X[[1]], matrix(0,2,2)), cbind(matrix(0,2,1), X[[2]])) ## ... and a vector alpha. alpha <- list(c(1), c(-2,1)) ## Compute iS * X iS.X <- calc.iS.X(X, iS) ## or iS %*% Xt ## Compute X'* iS * X calc.X.iS.X(X, iS.X) ## or t(Xt) %*% iS %*% Xt ## Compute X* alpha calc.mu.B(X, alpha) ## or cbind(X[[1]] %*% alpha[[1]], X[[2]] %*% alpha[[2]])