Learn R Programming

EnviroStat (version 0.4-2)

staircase.EM: Estimate gauged sites hyperparameters

Description

Estimate $\cal{H}_g$ hyperparameters of the gauged sites using the EM algorithm, using the staircase of the missing data to determine the default block structure.

Usage

staircase.EM(data, p = 1, block = NULL, covariate = NULL, B0 = NULL, init = NULL, a = 2, r = 0.5, verbose = FALSE, maxit = 20, tol = 1e-06)

Arguments

data
data matrix, grouped by blocks each with stations having the same number of missing observations. The blocks are organized in order of decreasing number of missing observations, ie. block 1 has more missing observations than block2.

Default structure:

  • Each column represent data from a station; rows are for time
  • Blocks are decided based on the number of missing observations

p
number of pollutants measured at each stations. (first p columns of y are for p pollutants from station 1, block 1).
block
a vector indicating the number of stations in each block - from 1 to K
covariate
design matrix for covariates created with model.matrix with as.factor
B0
Provided if the hyperparameter $\beta_0$ (B0) is known and not estimated
init
Initial values for the hyperparameters; output of this function can be used for that
a
When p=1, the type-II MLE's for delta's are not available. Delta's are assumed to follow a gamma distribution with parameters (a,r)
r
When p=1, the type-II MLE's for delta's are not available. Delta's are assumed to follow a gamma distribution with parameters (a,r)
verbose
flag for writing out the results at each iteration
maxit
the default maximum number of iterations
tol
the convergence level.

Value

A list with following elements:
Delta
The estimated degrees freedom for each of the blocks (list)
Omega
The estimated covariance matrix between pollutants
Lambda
The estimated conditional covariance matrix between stations in each block given data at stations in higher blocks (less missing data) - (list)
Xi0
The estimated slopes of regression between stations in each blocks and those in higher blocks (list). Note that $\tau_{0i} = {\rm kronecker}(\xi_0, diag(p))$ - same across stations for each pollutants.
Beta0
Coefficients - assumed to be the same across stations for each pollutant
Finv
Scale associated with $\beta_0$
Hinv
The estimated hyperparameters (list) - inverse of $H_j$
Psi
The estimated (marginal) covariance matrix between stations
block
From input
data
From input
covariate
From input
Lambda.1K
The inverse Bartlett decomposition (eqn 23?)

Details

The estimated model is as follows:
  • $data \sim MVN ( z \times \beta , {\rm kronecker}(I, \Sigma) )$
  • $\beta \sim MVN (\beta_0 , {\rm kronecker}(F^{-1} , \Sigma ) )$
  • $\Sigma \sim GIW (\Theta , \delta )$

$\Theta$ is a collection of hyperparameters including $\xi_0, \Omega, \Lambda, H^{-1}$.

See Also

staircase.hyper.est