blup_adi: Best Linear Unbiased Prediction in Separable-plus-banded...

View source: R/cvband.R

blup_adiR Documentation

Best Linear Unbiased Prediction in Separable-plus-banded Model

Description

Best Linear Unbiased Prediction in Separable-plus-banded Model

Usage

blup_adi(Xnew, A1, A2, band, m1, m2, theta = 1e-05)

Arguments

Xnew

new observation to be predicted, a K1 x K2 matrix with last K1-m1+1 rows and K2-m2+1 columns equal to zero (unobserved)

A1

temporal kernel of the separable-plus-banded model

A2

spatial kernel of the separable-plus-banded model

band

symbol of the banded part of the separable-plus-banded model

m1

Xnew observed until this row index

m2

Xnew observed until this column index

theta

regularization for adi()

Value

prediction of Xnew, i.e. matrix of size K1 x K2 where the last columns and rows are no longer zero

Examples

N <- 100
K1 <- 5
K2 <- 7
A1 <- matrix(rnorm(K1^2),K1)
A2 <- matrix(rnorm(K2^2),K2)
A1 <- A1 %*% t(A1)
A2 <- A2 %*% t(A2)
A1 <- mat_root(A1)
A2 <- mat_root(A2)
X <- A1 %*% array(rnorm(K1*K2),c(K1,K2)) %*% A2 + matrix(rnorm(K1*K2),K1)
Xhat <- blup_adi(X,A1,A2,as.matrix(1),4,5)
norm(X-Xhat, type="F")/norm(X, type="F")

TMasak/surfcov documentation built on April 25, 2022, 12:15 a.m.