MSE_BLUP: Mean Square Error of the Best Linear Unbiased Predictor

Description Usage Arguments Value Note Examples

View source: R/MSE_BLUP.R

Description

MSE_BLUP(F, V, var, f, v) calculates the Mean Square Error (MSE) of the Best Linear Unbiased Predictor (BLUP) of FDSLRM time series in time t_{n+d}.

Usage

1
MSE_BLUP(F, V, var, f, v)

Arguments

F

design matrix for fixed effects.

V

design matrix for random effects.

var

variance parameters.

f

values of functions forming the columns of design matrix F computed in time t_{n+d}.

v

values of functions forming the columns of design matrix V computed in time t_{n+d}.

Value

MSE of the BLUP of X_{t_{n+d}}.

Note

Ver.: 13-Mar-2019 18:50:41.

Examples

1
2
3
4
5
6
7
8
9
## EXAMPLE 1
dt <- data.frame(t = c(1:24), x = c(40.3, 40.7, 38.5, 37.9, 38.6, 41.1, 45.2, 45.7, 46.7, 46.5, 45.2, 45.1, 45.8, 46.3, 47.5, 48.5, 49.1, 51.7, 50.6, 48, 44.7, 41.2, 40, 40.3))
F <- makeF(dt$t, c(1/24))
V <- makeV(dt$t, c(1/8,1/6))
f <- c(1, cos(2 * pi * 32/24), sin(2 * pi * 32/24))
v <- c(cos(2 * pi * 32/8), sin(2 * pi * 32/8), cos(2 * pi * 32/6), sin(2 * pi * 32/6))
var_estim <- NE(dt$x, F, V)
mse_blup <- MSE_BLUP(F, V, var_estim, f, v)
mse_blup

gajdosandrej/fdslrm documentation built on April 28, 2020, 11:35 a.m.