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.