Description Usage Arguments Details Value Author(s) See Also Examples
Compute the conditional expectations (i.e. predictions) at the unobserved
space-time locations. Predictions are computed for the space-time locations in
object
and/or STdata
, conditional on the observations (and
temporal trends) in object
and parameters given in x
.
1 2 3 4 5 6 |
object |
|
x |
Model parameters for which to compute the conditional
expectation. Either as a vector/matrix or an |
STdata |
|
Nmax |
Limits the size of matrices constructed when computing expectations. Use a smaller value if memory becomes a problem. |
only.pars |
Compute only the regression parameters (using GLS) along with the related variance. |
nugget.unobs |
Value of nugget at unonserved locations, either a scalar
or a vector with one element per unobserved site. NOTE: All sites in
|
only.obs |
Compute predictions at only locations specified by
observations in |
pred.var, pred.covar |
Compute point-wise prediction variances; or
compute covariance matrices for the predicted time series at each location.
|
beta.covar |
Compute the full covariance matrix for the latent beta-fields, otherwise only the diagonal elements of V(beta|obs) are computed. |
combine.data |
Combine |
type |
A single character indicating the type of prediction to
compute. Valid options are "f", "p", and "r", for full,
profile or restricted maximum likelihood (REML). For profile
and full the predictions are computed assuming that both covariance
parameters and regression parameters are known,
e.g. |
LTA |
Compute long-term temporal averages. Either a logical value or a
list; if |
transform |
Regard field as log-Gaussian and apply exponential transformation to predictions. For the final expectations two options exist, either a unbiased prediction or the (biased) mean-squared error predictions. |
... |
Ignored additional arguments. |
In addition to computing the conditional expectation at a number of space-time locations the function also computes predictions based on only the regression part of the model as well as the latent beta-fields.
Prediction are computed as the conditional expectation of a latent field
given observations. This implies that E(X_i| Y_i) != Y_i
, with the
difference being due to smoothing over the nugget. Further two possible
variance can be computed (see below), V(X_i|Y_i)
and
V(X_i|Y_i)+nugget_i
. Here the nugget for unobserved locations needs
to be specified as an additional argument nugget.nobs
. The two
variances correspond, losely, to confidence and prediction intervals.
Variances are computed if pred.var=TRUE
point-wise variances for the
predictions (and the latent beta-fields) are
computed. If instead pred.covar=TRUE
the full covariance matrices for
each predicted time series is computed; this implies that the covariances between
temporal predictions at the same location are calculated but not, due
to memory restrictions, any covariances between locations.
beta.covar=TRUE
gives the full covariance matrices for the latent
beta-fields.
If transform!="none"
the field is assumed to be log-Gaussian and
expectations are transformed, and if pred.var=TRUE
the mean squared
prediction errors are given.
The function returns a list containing (objects not computed will be missing):
opts |
Copy of options used in the function call. |
pars |
A list with regression parameters and related variances.
|
beta |
A list with estimates of the beta-fields, including the
regression mean |
EX.mu |
predictions based on the regression parameters, geographic covariates, and temporal trends. I.e. only the deterministic part of the spatio-temporal model. |
EX.mu.beta |
Predictions based on the latent-beta fields, but excluding the residual nu field. |
EX |
Full predictions at the space-time locations in
|
EX.pred |
Only for |
VX,VX.pred |
Pointwise variances and prediction variances (i.e. incl.
contribution from |
VX.full |
A list with (number of locations) elements, each element is a (number of timepoints) - by - (number of timepoints) temporal covariance matrix for the timeseries at each location. |
MSPE,MSPE.pred |
Pointwise mean-square prediction errors for the log-Gaussian fields. |
log.EX,log.VX.pred,log.VX |
Pointwise predictions and variances for
the un-transformed fields when |
LTA |
A data.frame with temporal averages for locations specified by
|
I |
A vector with the locations of the observations in |
Johan Lindstrom
Other STmodel methods: MCMC.STmodel
,
c.STmodel
, createSTmodel
,
estimate.STmodel
,
estimateCV.STmodel
,
plot.STdata
, print.STmodel
,
print.summary.STmodel
,
qqnorm.predCVSTmodel
,
scatterPlot.predCVSTmodel
,
simulate.STmodel
,
summary.STmodel
Other predictSTmodel methods: plot.predCVSTmodel
,
print.predictSTmodel
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ##load data
data(mesa.model)
data(est.mesa.model)
##find regression parameters using GLS
x.reg <- predict(mesa.model, est.mesa.model, only.pars = TRUE)
str(x.reg$pars)
## Not run:
##compute predictions at all locations, including beta-fields
pred.mesa.model <- predict(mesa.model, est.mesa.model,
pred.var=TRUE)
## End(Not run)
##Let's load precomputed results instead.
data(pred.mesa.model)
##study results
print(pred.mesa.model)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.