Learn R Programming

SpatioTemporal (version 1.1.7)

SpatioTemporal-package: Spatio-Temporal Modelling

Description

Package for spatio-temporal modelling. Contains functions that estimate, simulate and predict from the model described in (Szpiro et.al., 2010; Sampson et.al., 2011; Lindstr<U+001AD825>t.al., 2010). The package also contains functions that handle missing data SVD in accordance with (Fuentes et.al. 2006).

Package: SpatioTemporal
Type: Package
Version: 1.1.7
Date: 2013-08-12
License: GPL version 2 or newer
LazyLoad: yes

Examples in the package uses data from the Multi-Ethnic Study of Atherosclerosis and Air Pollution (MESA Air), (Cohen et.al.,2009).

Arguments

Changelog

1.1.7

Upates: Handling of log-Gaussian fields

Updated several functions to allow for prediction and CV of log-Gaussian fields. Updated functions: predict.STmodel, print.predictSTmodel, plot.predictSTmodel, predictCV.STmodel, print.predCVSTmodel, summary.predCVSTmodel, plot.predCVSTmodel, qqnorm.predCVSTmodel, and scatterPlot.predCVSTmodel. Updated predict.STmodel to compute temporal averages, and return both prediction and variance of the averages. Both for Gaussian and log-Gaussian data.
1.1.6

Upates: sparse-Matrices and temporal basis functions

Allows for sparse matrices in makeSigmaB and makeSigmaNu; this reduces the memory footprint and execution time for loglikeST, predict.STmodel, and estimate.STmodel. Added function that does regression estimates of the beta-coefficients: estimateBetaFields. Altered computation of CV-statistics in SVDsmoothCV. Added boxplot.SVDcv for illustration of CV-statistics from SVDsmoothCV. Replaced updateSTdataTrend with updateTrend.STdata and updateTrend.STmodel that also allows for temporal trends defined using functions. Updated SVDsmooth, SVDsmoothCV, and calcSmoothTrends to return both the trend and the smoothing function used to compute the trends, simplifying interpolation at unobserved time-points. Updated example data-sets. Added options for computation of temporal averages (incl. variances) to predict.STmodel and predictCV.STmodel.
1.1.5

Major bug fixes:

In predict.STmodel, predictions now always uses the trend given in object, ignoring the trend object in STdata. Prediction at dates in STdata are computed using the smoothing function that defines the trend; see updateTrend.STmodel for details. In summary.predCVSTmodel, code previously divided by the wrong variance when computing adjusted R2 using the pred.naive option. In summary.predCVSTmodel, code previously returned statistics even for dates without observations when using by.date=TRUE. In plot.STdata and plot.STmodel code now accounts for missing time-points when computing acf and pacf.
1.1.4

Added plot funcions/Minor fixes:

Added scatterPlot.STdata, scatterPlot.STmodel, and scatterPlot.predCVSTmodel for plotting observations/residuals against covariates. Added plot.mcmcSTmodel, density.mcmcSTmodel, and plot.density.mcmcSTmodel for plotting of MCMC results. Added qqnorm.STdata, qqnorm.STmodel, and qqnorm.predCVSTmodel for plotting of data and CV-prediction results. Added a restart option to estimate.STmodel allowing for restarts of optimisation in cases on bad optimisation.
1.1.3

Minor changes/Bug fixes:

Fixed stupid misstake in predictNaive that caused computations to take unnecessarily long.
1.1.2

Minor changes/Bug fixes:

Fixed a bug in SVDsmooth, that caused the values in the temporal smooths to depend on the number of unobserved time points.. This also affects calcSmoothTrends and updateSTdataTrend when the option extra.dates is in use. Fixed bug in simulate.STmodel that caused NA values when simulating at unobserved sites. Fixed bug in predict.STmodel that could cause errors when predicting at unobserved sites. Fixed bug in predictCV.STmodel and predict.STmodel; these will now handle predictions at locations with incomplete nugget covariates. Updated c.STmodel and predict.STmodel to avoid errors/warnings due to more complex nugget models. Replaced warning in createSTdata when extra.dates!=NULL and n.basis=NULL with a message.
1.1.1

Bug fixes:

c.STmodel will now combine STmodel objects with identical covariate scaling.
1.1.0

Major Changes:

Changed the return of the variances for beta in predict.STmodel. Reduced the memory footprint of predict.STmodel. Error checks in c.STmodel and predict.STmodel, combination of STmodel objects with different covariate scaling is NOT possible.
1.0.7

Added:

New plot function: plot.predCVSTmodel. coef.estimateSTmodel and coef.estCVSTmodel functions that extract estimated parameters. Parameters for predict.STmodel and predictCV.STmodel can be specified using estimateSTmodel or estCVSTmodel objects. An lwd option to plot.predictSTmodel. A short introductory vignette as complement to the full tutorial.
1.0.6

Bug fixes:

predictNaive now works for only one locations. detrendSTdata now works for different regions.
1.0.5

Added packages maps and plotrix to suggested packages.

1.0.4

Bug fixes:

prediction for leave-one-out CV. stop updateCovf crashing in Rscript/R CMD BATCH.
1.0.3

Minor bug fixes

1.0.2

Updated documentation and vignette

1.0.0

Major change, most old functions are now deprecated. New features:

Different covariance functions Nuggets in the beta-fields Different nuggets for different locations in the nu-field. Different coordinates for beta and nu-fields, allowing for precomputed deformations Covariates can be specifed using formula-objects
0.9.2

Minor updates - no user visible changes

0.9.0

First CRAN-release

0.1.0

First released version, short course at TIES-2010

References

M. A. Cohen, S. D. Adar, R. W. Allen, E. Avol, C. L. Curl, T. Gould, D. Hardie, A. Ho, P. Kinney, T. V. Larson, P. D. Sampson, L. Sheppard, K. D. Stukovsky, S. S. Swan, L. S. Liu, J. D. Kaufman. (2009) Approach to Estimating Participant Pollutant Exposures in the Multi-Ethnic Study of Atherosclerosis and Air Pollution (MESA Air). Environmental Science & Technology: 43(13), 4687-4693.

M. Fuentes, P. Guttorp, and P. D. Sampson. (2006) Using Transforms to Analyze Space-Time Processes in Statistical methods for spatio-temporal systems (B. Finkenst<e4>dt, L. Held, V. Isham eds.) 77-150

J. Lindstr<U+001ADB20>A. Szpiro, P. D. Sampson, L. Sheppard, A. Oron, M. Richards, and T. Larson T. (2010) A flexible spatio-temmporal model for air pollution: allowing for spatio-temporal covariates. Berkeley Electronic Press, University of Washington Biostatistics Working Paper Series, No. 370. http://www.bepress.com/uwbiostat/paper370

A. Szpiro, P. D. Sampson, L. Sheppard, T. Lumley, S. D. Adar, and J. D. Kaufman. (2010) Predicting intra-urban variation in air pollution concentrations with complex spatio-temporal dependencies. Environmetrics: 21, 606-631.

P. D. Sampson, A. Szpiro, L. Sheppard, J. Lindstr<U+001ADB20>J. D. Kaufman. (2011) Pragmatic Estimation of a Spatio-temporal Air Quality Model with Irregular Monitoring Data. Atmospheric Environment: 45(36), 6593-6606.

Examples

Run this code
# NOT RUN {
##For a short introduction see:
# }
# NOT RUN {
  vignette("ST_intro",package="SpatioTemporal")
# }
# NOT RUN {
##For a worked out data-analysis exmaple see the tutorial.
##NOTE: This vignette is still work in progress
# }
# NOT RUN {
  vignette("Tutorial",package="SpatioTemporal")
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab