hbstm
is used to fit Hierarchical Bayesian Space Time models.
hbstm(Zt,K,newGrid,reglag,seas,spatlags,hyperpriors,initialvalues,
nIter,nBurn,fit,plots,posterior,save,control)
: MxT "data.frame"
containing the data. The rows contains the "M" spatial points and the columns the "T" temporal observations.
: MxS "matrix"
that relates the observed spatial points with the new Grid. S is the number of predicted spatial points.
An Sx2 "data.frame"
containing the "Longitude" and the "Latitude" of the new Grid.
A vector containing the temporal autoregressive lags of the model.
A vector containing the seasonal coefficients of the model.
A vector of length 4 containing the spatial lags of the model. See details for more information.
An object of class Hyperpriors
containing all the values of the model hyperpriors.
An object of class Parameters
containing all the initial values of the model parameters.
Number of Gibbs Sampling iterations. Default value is 1000.
Number of burn-in samples. This number of samples will be discarded before making any inference. Default value is the 20 percent of nIter.
A "logical"
indicating whether the HBSTM is fitted.
A "logical"
indicating whether the method shows the plots of the execution (The mse, Zt vs X*Yt and the ACF/PACF of the residuals.
A "character"
indicating whether the function returns the 'mean' and 'sd' the fitted values of Yt or returns the 'median' with its 95 percent credibility intervals.
A "character"
indicating if, for each iteration, the algorithm saves the estimation of certain parameters. See "Details"s for more information.
a list of control parameters. See "Details".
Each position of the argument spatlags
refers to the spatial lags of a specified direction. These four directions are "east-west", "north-south", "northwest-southeast" and "northeast-southwest".
The save
argument is a "character"
that can have any of the following options:
-"all"
: Save an object of class Parameters
.
-"Mu"
: Save an object of class Mu
.
-"Mt"
: Save an object of class Mt
.
-"Xt"
: Save an object of class Xt
.
The control
argument is a list that can supply any of the following components:
-time
: A "logical"
indicating whether the method shows the estimated time of execution.
-timerem
: A "logical"
indicating whether the method shows the estimated remaining time of execution
-seed
: The seed to use in the function "set.seed"
and set it to fit the model.
Overview: HBSTM-package
Classes : '>HBSTM,'>Parameters,'>Mu,'>Mt,'>Xt,'>Autoregressive,'>Seas,'>SpatParam,'>VectSubdiag,
'>Hyperpriors,'>Mu0,'>Mt0,'>Xt0,'>Seas0,'>Autoregressive0,'>SpatParam0,'>VectSubdiag0
Methods : hbstm,hbstm.fit,results,estimation,resid,mse
Plot : plotRes,plotFit
Data: hirlam,coordinates
# NOT RUN {
## See 'tutorial.pdf', included in the documentation of the package, to see a full example
# }
Run the code above in your browser using DataLab