Description Usage Arguments Details Value Author(s) References See Also Examples
The function computes the maximum likelihood estimates of the unknown parameters of a hierarchical spatio-temporal model of class “Stem.Model”. The estimates are obtained using Kalman filtering and EM algorithm.
1 2 | Stem.Estimation(StemModel, precision = 0.01, max.iter = 50,
flag.Gdiag = TRUE, flag.Sigmaetadiag = TRUE, cov.spat = Sigmastar.exp)
|
StemModel |
an object of class “Stem.Model” given as output by the |
precision |
a small positive number used for the algorithm convergence. Default is equal to 0.01. See |
max.iter |
maximum number of iterations for the EM algorithm. Default is equal to 50. |
flag.Gdiag |
logical, indicating whether the transition matrix G is diagonal. |
flag.Sigmaetadiag |
logical, indicating whether the variance-covariance matrix of the state equation Σ_η is diagonal. |
cov.spat |
type of spatial covariance function. For the moment only the exponential function is implemented. |
This function estimates the vector parameter phi
of the hierarchical spatio-temporal model of class “Stem.Model” using Kalman filtering and EM algorithm.
The algorithm details and formulas are given in Fasso' and Cameletti (2007, 2009). Note that some parameters (beta
, sigma2omega
,
G
, Sigmaeta
and m0
) are updated using closed form solutions while theta
and sigma2epsilon
using the Newton-Raphson algorithm.
For initializing the algorithm the values contained in StemModel$skeleton$phi
are used as initial values.
The algorithm converges when the following convergence criteria (named in the output as conv.par
and conv.log
respectively) are jointly met
||φ^{i+1}-φ^{i} || / ||φ^{i}|| < π
||log L(φ^{i+1}-log L(φ^{i})|| / ||log L(φ^{i})||<π
where π is given by the precision
option and i is the number of iteration. The use of these relative criteria instead of some other absolute ones makes it possible to
correct for the different parameter scales.
The function returns an object of class “Stem.Model” which is a list given by:
skeleton |
As the |
data |
As the |
estimates |
A list of four objects:
|
Michela Cameletti michela.cameletti@unibg.it
Amisigo, B.A., Van De Giesen, N.C. (2005) Using a spatio-temporal dynamic state-space model with the EM algorithm to patch gaps in daily riverflow series. Hydrology and Earth System Sciences 9, 209–224.
Fasso, A., Cameletti, M., Nicolis, O. (2007) Air quality monitoring using heterogeneous networks. Environmetrics 18, 245–264.
Fasso', A., Cameletti, M. (2007) A general spatio-temporal model for environmental data. Tech.rep. n.27 Graspa - The Italian Group of Environmental Statistics - http://www.graspa.org.
Fasso', A., Cameletti, M. (2009) A unified statistical approach for simulation, modelling, analysis and mapping of environmental data. Accepted for publication by Simulation: transaction of the Society for Modeling and Simulation International.
Mc Lachlan, G.J., Krishnan, T. (1997) The EM Algorithm and Extensions. Wiley, New York.
Shumway, R.H., Stoffer, D.S. (2006) Time Series Analysis and Its Applications: with R Examples. Springer, New York.
Xu, K., Wikle, C.K. (2007) Estimation of parameterized spatio-temporal dynamic models. Journal of Statistical Inference and Planning 137, 567–588.
See Also Stem.Model
and pm10
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 | #load the data
data(pm10)
#extract the data
coordinates <- pm10$coords
covariates <- pm10$covariates
z <- pm10$z
#build the parameter list
#(the phi list is used for the algorithm starting values)
phi <- list(beta=matrix(c(3.65,0.046,-0.904),3,1),
sigma2eps=0.1,
sigma2omega=0.2,
theta=0.01,
G=matrix(0.77,1,1),
Sigmaeta=matrix(0.3,1,1),
m0=as.matrix(0),
C0=as.matrix(1))
K <-matrix(1,ncol(z),1)
mod1 <- Stem.Model(z=z,covariates=covariates,
coordinates=coordinates,phi=phi,K=K)
class(mod1)
is.Stem.Model(mod1)
#mod1 is given as output by the Stem.Model function
mod1.est <- Stem.Estimation(mod1)
phi.estimates <- unlist(mod1.est$estimates$phi.hat)
|
Loading required package: mvtnorm
Loading required package: MASS
[1] "Stem.Model"
[1] TRUE
****************EM Algorithm - iteration n. 1
***NR Algorithm - iteration n. 1
***NR Algorithm - iteration n. 2
***NR Algorithm - iteration n. 3
***NR Algorithm - iteration n. 4
***NR Algorithm - iteration n. 5
****************EM Algorithm - iteration n. 2
***NR Algorithm - iteration n. 1
***NR Algorithm - iteration n. 2
***NR Algorithm - iteration n. 3
***NR Algorithm - iteration n. 4
****************EM Algorithm - iteration n. 3
***NR Algorithm - iteration n. 1
***NR Algorithm - iteration n. 2
***NR Algorithm - iteration n. 3
***NR Algorithm - iteration n. 4
***NR Algorithm - iteration n. 5
****************EM Algorithm - iteration n. 4
***NR Algorithm - iteration n. 1
***NR Algorithm - iteration n. 2
****************EM Algorithm - iteration n. 5
***NR Algorithm - iteration n. 1
***NR Algorithm - iteration n. 2
****************EM Algorithm - iteration n. 6
***NR Algorithm - iteration n. 1
***NR Algorithm - iteration n. 2
****************EM Algorithm - iteration n. 7
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.