| SRE-class {FRK} | R Documentation |
Spatial Random Effects class
Description
This is the central class definition of the FRK package, containing the model and all other information required for estimation and prediction.
Details
The spatial random effects (SRE) model is the model employed in Fixed Rank Kriging, and the SRE object contains all information required for estimation and prediction from spatial data. Object slots contain both other objects (for example, an object of class Basis) and matrices derived from these objects (for example, the matrix S) in order to facilitate computations.
Slots
fformula used to define the SRE object. All covariates employed need to be specified in the object
BAUsdatathe original data from which the model's parameters are estimated
basisobject of class
Basisused to construct the matrixSBAUsobject of class
SpatialPolygonsDataFrame,SpatialPixelsDataFrameofSTFDFthat contains the Basic Areal Units (BAUs) that are used to both (i) project the data onto a common discretisation if they are point-referenced and (ii) provide a BAU-to-data relationship if the data has a spatial footprintSmatrix constructed by evaluating the basis functions at all the data locations (of class
Matrix)S0matrix constructed by evaluating the basis functions at all BAUs (of class
Matrix)D_basislist of distance-matrices of class
Matrix, one for each basis-function resolutionVemeasurement-error variance-covariance matrix (typically diagonal and of class
Matrix)Vfsfine-scale variance-covariance matrix at the data locations (typically diagonal and of class
Matrix) up to a constant of proportionality estimated using the EM algorithmVfs_BAUsfine-scale variance-covariance matrix at the BAU centroids (typically diagonal and of class
Matrix) up to a constant of proportionality estimated using the EM algorithmQfs_BAUsfine-scale precision matrix at the BAU centroids (typically diagonal and of class
Matrix) up to a constant of proportionality estimated using the EM algorithmZvector of observations (of class
Matrix)Cmatincidence matrix mapping the observations to the BAUs
Xdesign matrix of covariates at all the data locations
Glist of objects of class Matrix containing the design matrices for random effects at all the data locations
G0list of objects of class Matrix containing the design matrices for random effects at all BAUs
K_typetype of prior covariance matrix of random effects. Can be "block-exponential" (correlation between effects decays as a function of distance between the basis-function centroids), "unstructured" (all elements in
Kare unknown and need to be estimated), or "neighbour" (a sparse precision matrix is used, whereby only neighbouring basis functions have non-zero precision matrix elements).mu_etaupdated expectation of the basis-function random effects (estimated)
mu_gammaupdated expectation of the random effects (estimated)
S_etaupdated covariance matrix of random effects (estimated)
Q_etaupdated precision matrix of random effects (estimated)
Khatprior covariance matrix of random effects (estimated)
Khat_invprior precision matrix of random effects (estimated)
alphahatfixed-effect regression coefficients (estimated)
sigma2fshatfine-scale variation scaling (estimated)
sigma2gammarandom-effect variance parameters (estimated)
fs_modeltype of fine-scale variation (independent or CAR-based). Currently only "ind" is permitted
info_fitinformation on fitting (convergence etc.)
responseA character string indicating the assumed distribution of the response variable
linkA character string indicating the desired link function. Can be "log", "identity", "logit", "probit", "cloglog", "reciprocal", or "reciprocal-squared". Note that only sensible link-function and response-distribution combinations are permitted.
mu_xiupdated expectation of the fine-scale random effects at all BAUs (estimated)
Q_posteriorupdated joint precision matrix of the basis function random effects and observed fine-scale random effects (estimated)
log_likelihoodthe log likelihood of the fitted model
methodthe fitting procedure used to fit the SRE model
phithe estimated dispersion parameter (assumed constant throughout the spatial domain)
k_Zvector of known size parameters at the observation support level (only applicable to binomial and negative-binomial response distributions)
k_BAUvector of known size parameters at the observed BAUs (only applicable to binomial and negative-binomial response distributions)
include_fsflag indicating whether the fine-scale variation should be included in the model
include_gammaflag indicating whether there are gamma random effects in the model
normalise_wtsif
TRUE, the rows of the incidence matricesC_ZandC_Pare normalised to sum to 1, so that the mapping represents a weighted average; if false, no normalisation of the weights occurs (i.e., the mapping corresponds to a weighted sum)fs_by_spatial_BAUif
TRUE, then each BAU is associated with its own fine-scale variance parameterobsidxindices of observed BAUs
simple_kriging_fixedlogical indicating whether one wishes to commit to simple kriging at the fitting stage: If
TRUE, model fitting is faster, but the option to conduct universal kriging at the prediction stage is removed
References
Zammit-Mangion, A. and Cressie, N. (2017). FRK: An R package for spatial and spatio-temporal prediction with large datasets. Journal of Statistical Software, 98(4), 1-48. doi:10.18637/jss.v098.i04.
See Also
SRE for details on how to construct and fit SRE models.