Description Usage Arguments Value See Also Examples
Standardize spacial covariates with respect to both the space and time dimensions
1 | applystnd.Hs(Hs0, x)
|
Hs0 |
Spacial covariates (of interpolation sites). An n* x p_s numeric matrix. |
x |
Spacial standardization object, as created by |
An n* x p_s matrix.
stnd.Hst.ls
, applystnd.Hst.ls
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | n.all <- 21
Hs.all <- cbind(1, rnorm(n.all, 1, 0.1), rnorm(n.all, -200, 21))
ndx.interp <- c(1,3,5)
ndx.support <- I(1:n.all)[ -ndx.interp ]
Hs <- Hs.all[ndx.support, , drop=FALSE]
xsns.obj <- stnd.Hs(Hs)
Hs0 <- Hs.all[ndx.interp, , drop=FALSE]
sHs0 <- applystnd.Hs(Hs0, xsns.obj)
sHs0
xsns.obj$sHs
crossprod(xsns.obj$sHs) / nrow(Hs)
crossprod(sHs0) / nrow(sHs0)
## The function is currently defined as
function (Hs0, x)
{
sHs0 <- t((t(Hs0) - x$h.mean)/x$h.sd)
if (x$intercept) {
sHs0[, 1] <- 1/sqrt(x$n)
}
return(sHs0)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.