stnd.Ht: Standardize Temporal Covariates

Description Usage Arguments Value See Also Examples

View source: R/stnd.Ht.R

Description

Standardize temporal covariates with respect to both the spacial and time dimensions

Usage

1
stnd.Ht(Ht, n)

Arguments

Ht

Temporal covariates (of supporting sites). A τ x p_t numeric matrix.

n

Number of sites. A positive scalar integer.

Value

A τ x p_t numeric matrix.

See Also

stnd.Hs, stnd.Hst.ls.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
##### Please see the examples in Hst.sumup


## The function is currently defined as
function (Ht, n) 
{
    h.mean <- apply(Ht, 2, mean)
    sHt <- t(t(Ht) - h.mean)
    sHt <- t(t(sHt)/apply(sHt, 2, function(x) {
        sqrt(sum(x^2))
    }))
    sHt <- sHt * sqrt(nrow(Ht)/n)
    return(sHt)
  }

widals documentation built on May 29, 2017, 10:11 p.m.

Search within the widals package
Search all R packages, documentation and source code