Type: | Package |
Title: | Hierarchical Bayesian Space-Time Models for Gaussian Space-Time Data |
Version: | 1.0.2 |
Author: | Pilar Munyoz, Alberto Lopez Moreno |
Maintainer: | Alberto Lopez Moreno <bertolomo@gmail.com> |
Description: | Fits Hierarchical Bayesian space-Time models for Gaussian data. Furthermore, its functions have been implemented for analysing the fitting qualities of those models. |
License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2.0)] |
Encoding: | UTF-8 |
LazyData: | true |
Depends: | methods, MASS, fBasics, maps, stats, graphics,grDevices,utils |
NeedsCompilation: | no |
Packaged: | 2022-05-28 13:11:30 UTC; SSM |
Repository: | CRAN |
Date/Publication: | 2022-05-28 13:50:02 UTC |
Hierarchical Bayesian Space-Time models for Gaussian space-time data
Description
This package fits Hierarchical Bayesian space-Time models for Gaussian data. Furthermore, its functions have been implemented for analysing the fitting qualities of those models.
Details
Package: | HBSTM |
Type: | Package |
Version: | 1.0 |
Date: | 2013-12-24 |
License: | GPL (>=2.0) |
Depends: | methods, MASS, msm, fBasics, maps |
Author(s)
Pilar Munyoz and Alberto Lopez Moreno Maintainer: Alberto Lopez Moreno <bertolomo@gmail.com>
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
Class "Autoregressive"
Description
"Autoregressive"
contains the parameter values of the autoregressive component, and it is an internal class stored in the class "Xt"
.
Slots
avect
:An Sx1
"matrix"
(S is the number of spatial points on the predicted grid) containing the temporal autoregressive parameteravect
a0vect
:An Sx1
"matrix"
containing the temporal autoregressive parametera0vect
a0L
:A 3x1
"matrix"
containing the temporal autoregressive parametera0L
spatialA
:An object of class
"SpatParam"
containing the fitted values of the spatial parameters ofavect
.sigma2A
:Contains the fitted value of the variance
sigma2A
.H
:An SxS
"matrix"
containing all the autoregressive space-time parameters.subdiag
:An object of class
"VectSubdiag"
containing the fitted values of the space-time parameters.
Methods
- [
signature(x = "Autoregressive", i = "character", j = "missing", drop = "missing")
: extract the components of the model.- [<-
signature(x = "Autoregressive", i = "character", j = "missing")
: assign values to the components of the model.
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
Class "Autoregressive0"
Description
"Autoregressive0"
contains the hyperprior values of the autoregressive component, and it is an internal class stored in the class "Xt0"
.
Slots
a0L0
:A
"vector"
of length 3 with the mean hyperprior values of the parametera0L
.siga0L0
:A
"matrix"
of dimension 3X3 with the hyperprior variance of the parametera0L
.sigma2A0
:A
"vector"
of length 2 with the hyperprior values of the parametersigma2A
.spatialA0
:An object of class
"SpatParam0"
containing the hyperprior values of the spatial parameters ofavector
subdiag0
:An object of class
"VectSubdiag0"
containing the hyperprior values of the spatial-temporal parameters.
Methods
- [
signature(x = "Autoregressive0", i = "character", j = "missing", drop = "missing")
: extract the components of the model.- [<-
signature(x = "Autoregressive0", i = "character", j = "missing")
: assign values to the components of the model.
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
Class "HBSTM"
Description
"HBSTM"
contains all the information of the fitted Hierarchical Bayesian Space-Time model.
Slots
Parameters
:An object of
"Parameters"
containing all the parameters of the fitted model.Hyperpriors
:An object of class
"Hyperpriors"
containing all the hyperpiors used in the fitted model.seed
:The seed used to fit the model.
mse
:A vector containing the MSE of each iteration of the algorithm.
iterations
:The total number of iterations that the algorithm has executed.
newGrid
:An Sx2
"matrix"
(S is the number of spatial points of the predicted grid) containing the Longitude (1rst col.) and the Latitudes (2nd col.) of the new grid.K
:An MxS
"matrix"
(M = observed spatial points) that relates the observations to the new grid.Zt
:A MxT
"matrix"
(T is the temporal points) containing the data.fitted
:An
"array"
which contains the estimation of the fitted values of 'Yt'. The dimension of the array is SxTx2 when the algorithm estimates the mean and the standard deviation and is SxTx3 when the algorithm estimates the median and its 95 percent credibility intervals.residuals
:A MxT
"matrix"
with the obtained model residuals.MCMCsamp
:A
"list"
of length: the number of executed iterations containing the MCMC samples of the objects of class"Parameters"
,"Mu"
,"Mt"
or"Xt"
, for each iteration.MCMCclass
:A
"character"
that specifies which type of object is stored inMCMCsamp
. The options are"Parameters"
,"Mu"
,"Mt"
or"Xt"
Methods
- [
signature(x = "HBSTM", i = "character", j = "missing", drop = "missing")
: extract the components of the model.- [<-
signature(x = "HBSTM", i = "character", j = "missing")
: assign values to the components of the model.- hbstm.fit
signature(HBSTM = "HBSTM", niter = "numeric")
: ...- hbstm.save
signature(HBSTM = "HBSTM", name = "character")
: ...
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
Class "Hyperpriors"
Description
"Hyperpriors"
contains all the hyperpriors of the fitted HBSTM. It is an internal class and is stored in "HBSTM"
Slots
Mu0
:An object of class
"Mu0"
containing all the hyperpriors of the component"Mu"
.Mt0
:An object of class
"Mt0"
containing all the hyperpriors of the component"Mt"
.Xt0
:An object of class
"Xt0"
containing all the hyperpriors of the component"Xt"
.sigma2Y0
:A
"vector"
of length 2 with the hyperprior values of the parametersigma2Y
.sigma2E0
:A
"vector"
of length 2 with the hyperprior values of the parametersigma2E
.
Methods
- [
signature(x = "Hyperpriors", i = "character", j = "missing", drop = "missing")
: extract the components of the model.- [<-
signature(x = "Hyperpriors", i = "character", j = "missing")
: assign values to the components of the model.
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
Class "Mt"
Description
"Mt"
contains the parameter values of the seasonal component and is an internal class stored in "Parameters"
.
Slots
Mt
:A
"matrix"
of dimension SxT (S = predicted spatial points and T = temporal points) containing the fitted values of the parameterMt
seas
:A
"list"
of objects of class"Seas"
, one for each seasonality of the model.
Methods
- [
signature(x = "Mt", i = "character", j = "missing", drop = "missing")
: extract the components of the model.- [<-
signature(x = "Mt", i = "character", j = "missing")
: assign values to the components of the model.
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
Class "Mt0"
Description
"Mt0"
contains the hyperprior values of the seasonal component and it is an internal class stored in "Parameters0"
.
Slots
seas0
:A
"list"
of objects of class"Seas0"
, one for each seasonality of the model.
Methods
- [
signature(x = "Mt0", i = "character", j = "missing", drop = "missing")
: extract the components of the model.- [<-
signature(x = "Mt0", i = "character", j = "missing")
: assign values to the components of the model.
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
Class "Mu"
Description
"Mu"
contains the parameter values of the mean component and is an internal class stored in "Parameters"
.
Slots
muvect
:An Sx1
"matrix"
(S is the number of spatial points of the predicted grid) containing the temporal autoregressive parametermuvect
mu0vect
:An Sx1
"matrix"
containing the temporal autoregressive parametermu0vect
mu0L
:A 3x1
"matrix"
containing the temporal autoregressive parametera0L
sigma2Mu
:Contains the fitted value of the variance
sigma2Mu
.spatialMu
:An object of class
"SpatParam"
containing the fitted values of the spatial parameters ofmuvect
.
Methods
- [
signature(x = "Mu", i = "character", j = "missing", drop = "missing")
: extract the components of the model.- [<-
signature(x = "Mu", i = "character", j = "missing")
: assign values to the components of the model.
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
Class "Mu0"
Description
"Mu0"
contains the hyperprior values of the mean component and it is an internal class stored in the class "Parameters0"
.
Slots
mu0L0
:A
"vector"
of length 3 with the mean hyperprior values of the parametermu0L
sigmu0L0
:A
"matrix"
of dimension 3X3 with the hyperprior variance of the parametermu0L
sigma2Mu0
:A
"vector"
of length 2 with the hyperprior values of the parametersigma2Mu
spatialMu0
:An object of class
"SpatParam0"
containing the hyperprior values of the spatial parameters ofMu
Methods
- [
signature(x = "Mu0", i = "character", j = "missing", drop = "missing")
: extract the components of the model.- [<-
signature(x = "Mu0", i = "character", j = "missing")
: assign values to the components of the model.
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
Class "Parameters"
Description
"Parameters"
contains all the values of the fitted HBSTM parameters and it is an internal class stored in "HBSTM"
.
Slots
Mu
:An object of class
"Mu"
containing the parameters of the mean component.Mt
:An object of class
"Mt"
containing the parameters of the seasonal component.Xt
:An object of class
"Xt"
containing the parameters of the autoregressive space-time component.Yt
:A
"matrix"
of dimension SxT (S = predicted spatial points and T = temporal points) containing the fitted values of the parameterYt
sigma2Y
:Contains the fitted value of the variance
sigma2Y
.sigma2E
:Contains the fitted value of the variance
sigma2E
.
Methods
- [
signature(x = "Parameters", i = "character", j = "missing", drop = "missing")
: extract the components of the model.- [<-
signature(x = "Parameters", i = "character", j = "missing")
: assign values to the components of the model.
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
Class "Seas"
Description
"Seas"
contains the parameter values of the seasonal component and is an internal class stored in "Mt"
.
Slots
w
:The period of the seasonality
fvect
:An Sx1
"matrix"
(S is the number of spatial points of the predicted grid) containing the temporal autoregressive parameterfvect
f0L
:A 3x1
"matrix"
containing the temporal autoregressive parameterf0L
gvect
:A Sx1
"matrix"
containing the temporal autoregressive parametergvect
g0L
:A 3x1
"matrix"
containing the temporal autoregressive parameterg0L
Methods
- [
signature(x = "Seas", i = "character", j = "missing", drop = "missing")
: extract the components of the model.- [<-
signature(x = "Seas", i = "character", j = "missing")
: assign values to the components of the model.
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
Class "Seas0"
Description
"Seas0"
contains the hyperprior values of the seasonal component and is an internal class stored in the class "Mt0"
.
Slots
f0L0
:A
"vector"
of length 3 with the mean hyperprior values of the parameterf0L
sigf0L0
:A
"matrix"
of dimension 3X3 with the hyperprior variance of the parameterf0L
g0L0
:A
"vector"
of length 3 with the mean hyperprior values of the parameterg0L
sigg0L0
:A
"matrix"
of dimension 3X3 with the hyperprior variance of the parameterg0L
Methods
- [
signature(x = "Seas0", i = "character", j = "missing", drop = "missing")
: extract the components of the model.- [<-
signature(x = "Seas0", i = "character", j = "missing")
: assign values to the components of the model.
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
Class "SpatParam"
Description
"SpatParam"
contains the values of the spatial parameters and is an internal class stored in the classes "Mu"
and "Autorregressive"
.
Slots
alpha
:A
"vector"
of length: the number of horizontal (east-west) spatial lags. It contains the fitted values of the horizontal spatial parameters.beta
:A
"vector"
of length: the number of vertical (north-south) spatial lags. It contains the fitted values of the vertical spatial parameters.phi
:A
"vector"
of length: the number of diagonal (southeast-northwest) spatial lags. It contains the fitted values of the diagonal spatial parameters.theta
:A
"vector"
of length: the number of inverse-diagonal (southwest-northeast) spatial lags. It contains the fitted values of the inverse-diagonal spatial parameters.Cmat
:An SxS
"matrix"
(S is the number of spatial points of the predicted grid) containing all the spatial parameters.lags
:A
"vector"
containing the spatial lags for each direction. Each position of the vector is related to the lags of alpha, beta, phi and theta, respectively.dirs
:A
"vector"
containing the considered spatial directions of the model.
Methods
- [
signature(x = "SpatParam", i = "character", j = "missing", drop = "missing")
: extract the components of the model.- [<-
signature(x = "SpatParam", i = "character", j = "missing")
: assign values to the components of the model.
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
Class "SpatParam0"
Description
"SpatParam0"
contains the hyperprior values of the specified spatial parameters and is an internal class stored in the classes "Mu0"
and "Autorregressive0"
.
Slots
alpha0
:A
"matrix"
of dimension 2X(Length of alpha vector) with the means in the first row and the variance in the second row.beta0
:A
"matrix"
of dimension 2X(Length of beta vector) with the means in the first row and the variance in the second row.phi0
:A
"matrix"
of dimension 2X(Length of phi vector) with the means in the first row and the variance in the second row.theta0
:A
"matrix"
of dimension 2X(Length of theta vector) with the means in the first row and the variance in the second row.
Methods
- [
signature(x = "SpatParam0", i = "character", j = "missing", drop = "missing")
: extract the components of the model.- [<-
signature(x = "SpatParam0", i = "character", j = "missing")
: assign values to the components of the model.
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
Class "VectSubdiag"
Description
"VectSubdiag"
contains all the values of the space-time parameters and it is an internal class stored in "Autorregressive"
.
Slots
east
:A
"vector"
of length: the number of east spatial lags. It contains the fitted values of the east spatial-temporal parameters.west
:A
"vector"
of length: the number of west spatial lags. It contains the fitted values of the west spatial-temporal parameters.north
:A
"vector"
of length: the number of north spatial lags. It contains the fitted values of the north spatial-temporal parameters.south
:A
"vector"
of length: the number of south spatial lags. It contains the fitted values of the south spatial-temporal parameters.southeast
:A
"vector"
of length: the number of southeast spatial. It and contains the fitted values of the southeast spatial-temporal parameters.northwest
:A
"vector"
of length: the number of northwest spatial. It and contains the fitted values of the northwest spatial-temporal parameters.southwest
:A
"vector"
of length: the number of southwest spatial. It and contains the fitted values of the southwest spatial-temporal parameters.northeast
:A
"vector"
of length: the number of northeast spatial. It and contains the fitted values of the northeast spatial-temporal parameters.lags
:A
"vector"
containing the spatial lags for each direction. Each position of the vector is related to the lags of east, weast, north, south, southeast, northwest, southwest and northeast, respectively.dirs
:A
"vector"
containing all the space-time directions included in the model.
Methods
- [
signature(x = "VectSubdiag", i = "character", j = "missing", drop = "missing")
: extract the components of the model.- [<-
signature(x = "VectSubdiag", i = "character", j = "missing")
: assign values to the components of the model.
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
Class "VectSubdiag0"
Description
"VectSubdiag0"
contains the hyperprior values of the specified space-time parameters, and it is an internal class stored in "Autorregressive0"
Slots
east0
:A
"matrix"
of dimension 2X(Length of vector east) with the means in the first row and the variance in the second row.west0
:A
"matrix"
of dimension 2X(Length of vector west) with the means in the first row and the variance in the second row.north0
:A
"matrix"
of dimension 2X(Length of vector north) with the means in the first row and the variance in the second row.south0
:A
"matrix"
of dimension 2X(Length of vector south) with the means in the first row and the variance in the second row.southeast0
:A
"matrix"
of dimension 2X(Length of vector southeast) with the means in the first row and the variance in the second row.northwest0
:A
"matrix"
of dimension 2X(Length of vector northwest) with the means in the first row and the variance in the second row.southwest0
:A
"matrix"
of dimension 2X(Length of vector southwest) with the means in the first row and the variance in the second row.northeast0
:A
"matrix"
of dimension 2X(Length of vector northeast) with the means in the first row and the variance in the second row.
Methods
- [
signature(x = "VectSubdiag0", i = "character", j = "missing", drop = "missing")
: extract the components of the model.- [<-
signature(x = "VectSubdiag0", i = "character", j = "missing")
: assign values to the components of the model.
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
Class "Xt"
Description
"Xt"
contains the parameter values of the autoregressive part and is an internal class stored in "Parameters"
.
Slots
Xt
:A
"matrix"
of dimension SxT (S = predicted spatial points and T = temporal points) containing the fitted values of the parameterXt
.X0
:An Sx1
"matrix"
containing the auxiliary parameterX0
.sigma2N
:Contains the fitted value of the variance
sigmaN
.AR
:A
"list"
of objects of classAutoregressive
, one for each temporal lag of the model.templags
:A
"vector"
containing the temporal lags of the model.
Methods
- [
signature(x = "Xt", i = "character", j = "missing", drop = "missing")
: extract the components of the model.- [<-
signature(x = "Xt", i = "character", j = "missing")
: assign values to the components of the model..
Author(s)
Pilar Munyoz and Alberto Lopez Moreno
See Also
Overview: HBSTM-package
Classes : HBSTM,Parameters,Parameters,Mu,Mt,Xt,Autoregressive,Seas,SpatParam,VectSubdiag,
Hyperpriors,Mu0,Mt0,Xt0,Seas0,Autoregressive0,SpatParam0,VectSubdiag0
Methods : hbstm,hbstm.fit,results,estimation,resid
Plot : plotRes
Class "Xt0"
Description
"Xt0"
contains the hyperprior values of the autoregressive part and is an internal class and is stored in "Parameters0"
Slots
X00
:A
"vector"
of length S (S is the number of spatial points of the predicted grid) with the mean hyperprior values of the parameterX0
sigma2X00
:A
"matrix"
of dimension SXS with the hyperprior variance of the parameterX0
AR0
:A
"list"
of objects of class"Autorregresive0"
, one for each temporal lag of the model.sigma2N0
:A
"vector"
of length 2 with the hyperprior values of the parametersigma2N
Methods
- [
signature(x = "Xt0", i = "character", j = "missing", drop = "missing")
: extract the components of the model.- [<-
signature(x = "Xt0", i = "character", j = "missing")
: assign values to the components of the model.
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
Coordinates of the dataset "hirlam"
Description
The coordinates
data is a data set that contains the spatial coordinates of the space-time data hirlam
.
Format
A data frame with 70 observations on the following 2 variables.
Longitude
the longitude coordinates.
Latitude
the latitude coordinates.
Estimation of the median parameters
Description
Estimates the median parameters of an object of class HBSTM
.
Usage
estimation(object,digits)
Arguments
object |
an object of class |
digits |
integer indicating the number of decimal places to |
Details
In caste the MCMC samples of the object parameter are a specific component of the model, the others components have value -9999999.
Value
Returns an object of class Parameters
with the median estimation of the parameters MCMC samples.
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
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
Fitted function for Hierarchical Bayesian Space Time models
Description
This is the basic computing engine that hbstm
uses to fit Hierarchical Bayesian Space Time models. In general, this should not be used directly, unless by experienced users.
Usage
hbstm.fit(HBSTM,nIter,nBurn,time,timerem,plots,posterior,save)
Arguments
HBSTM |
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. |
time |
A |
timerem |
A |
plots |
A |
.
posterior |
A |
save |
A |
Details
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
.
Value
hbstm.fit
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
hirlam
Description
The data store the temperature, which is collected in a grid of 70 points (n=7 x m=10 points in the grid) in the area that extends from 4 degrees 30" W to 6 degrees 30"W longitude, and from 35 degrees 3"N to 36 degrees 5"N.
The analysed period covers January 1st 2009 to December 31st 2010; the frequency of the data is every 3 hours (temporal reference system is UTC); it starts at 00:00 (daily analysis) and forecasting is at 3:00, 6:00, 9:00, 12:00, 15:00, 18:00 and 21:00. The temperature is recorded every day, eight times a day; so we have a time series for each variable: one for each point on the grid with 5824 time observations.
Format
A data frame with 70 x 5824 observations.
The rows represent the spatial points ordered from up to down and left to right in the
hirlam)
coordinates.The columns represent the time observations.
Mean Square Error
Description
Calculate the mean square error of an object of class HBSTM
.
Usage
mse(object)
Arguments
object |
An object of class |
Value
Returns a "numeric"
with the mean square error value.
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
Plot the spatial data, estimation and residuals of an object of class HBSTM
Description
Fits an object of class HBSTM
Usage
plotFit(object,time,values)
Arguments
object |
An object of class |
time |
A integer indicating the time data to show in the spatial grid. By default, it is the last temporal observation. |
values |
A |
Value
By default, plotFit
returns an object of class "NULL"
. If the attribute matrices is TRUE
, plotFit
returns a "data.frame"
with three variables:
"Zt" |
: The data in a fixed temporal observation specified by the attribute codetime. |
"EstZt" |
: The data estimation in a fixed temporal observation specified by the attribute codetime. |
"Et" |
: The residuals extracted from |
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
Residual Plots
Description
Plot the residuals of the fitted values of an object of class HBSTM
.
Usage
plotRes(object,point,ARlags,ARperiod)
Arguments
object |
An object of class |
point |
A integer indicating the spatial point to show the results. By default a random spatial point is selected. |
ARlags |
Maximum lag at which the ACF and the PACF are calculated. Default is |
ARperiod |
The period of the data. Prints in red the lag in the period. |
Value
null
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
Results summary
Description
It shows the results of fitting an object of class HBSTM
.
Usage
results(object,spatTemp,inter,digits,component,plots,file)
Arguments
object |
An object of class |
spatTemp |
A list of vectors containing the spatial and the temporal points to show. See details. |
inter |
An optional numeric value for the interval credibility level. Default is 0.95 |
digits |
Integer indicating the number of decimal places to |
component |
An optional |
plots |
Plot the medians and the credibility intervals of the parameters. |
file |
An optional "character" containing the name of the .tex file where the results are stored (in the current work directory). By default the function does not store the results. |
Details
Each position in the spaTemp
list contains a numerical vector, in which the first position refers to a spatial point of the data and the second position to a temporal point of the data.
Value
null
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