hbstm {HBSTM} | R Documentation |
Fitting Hierarchical Bayesian Space Time models
Description
hbstm
is used to fit Hierarchical Bayesian Space Time models.
Usage
hbstm(Zt,K,newGrid,reglag,seas,spatlags,hyperpriors,initialvalues,
nIter,nBurn,fit,plots,posterior,save,control)
Arguments
Zt |
: MxT |
K |
: MxS |
newGrid |
An Sx2 |
reglag |
A vector containing the temporal autoregressive lags of the model. |
seas |
A vector containing the seasonal coefficients of the model. |
spatlags |
A vector of length 4 containing the spatial lags of the model. See details for more information. |
hyperpriors |
An object of class |
initialvalues |
An object of class |
nIter |
Number of Gibbs Sampling iterations. Default value is 1000. |
nBurn |
Number of burn-in samples. This number of samples will be discarded before making any inference. Default value is the 20 percent of nIter. |
fit |
A |
plots |
A |
posterior |
A |
save |
A |
control |
a list of control parameters. See "Details". |
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.
Value
hbstm
returns an object of class HBSTM
Author(s)
Pilar Munyoz and Alberto Lopez Moreno
See Also
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
Examples
## See 'tutorial.pdf', included in the documentation of the package, to see a full example