Learn R Programming

SpatioTemporal (version 0.9.2)

mesa.data: Example of a mesa.data Structure

Description

Example of a data structure holding observations, observation locations, smooth temporal trends, geographic covariates and spatio-temporal covariates.

Usage

data(mesa.data)

Arguments

encoding

latin1

source

Contains monitoring data from the MESA Air project, see Cohen et.al. (2009) and mesa.data.raw for details.

Details

This data structure provides an example of how the input data should be organised. The mesa.data object is used as input to create.data.model which creates a mesa.data.model that can be used as input to most of the functions in this package, e.g. loglike, fit.mesa.model, cond.expectation, run.MCMC, simulateMesaData, etc. Each of the components contains a number of elements. Additional elements can be added to the end of each component. Some common options are described below.

[object Object],[object Object],[object Object],[object Object],[object Object]

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.

See Also

See mesa.data.model and create.data.model.

For other data functions, see mesa.data.raw, create.data.matrix, construct.LUR.basis, and default.LUR.list.

Examples

Run this code
##load the data
data(mesa.data)

##Lets look at the data
names(mesa.data)

##Study the structure of the location data
head(mesa.data$location)

##...the covariates
head(mesa.data$LUR)

##...the smooth temporal trends
head(mesa.data$trend)

##...observations
head(mesa.data$obs)

##...and Spatio-temporal covariate
head(mesa.data$SpatioTemp)

##Look at the number of observations/locations
printMesaDataNbrObs(mesa.data)

##Let's plot the space-time monitoring locations
plotMonitoringLoc(mesa.data)

##Let's plot the observations as a function of time
plotMonitoringLoc(mesa.data, obsplot=TRUE, legend.loc="bottomleft")

##plot observations and residuals from the temporal trends
par(mfcol=c(3,2),mar=c(2.5,2.5,2,.5))
plotMesaData(mesa.data,5,type="obs")
plotMesaData(mesa.data,5,type="res")
plotMesaData(mesa.data,5,type="acf")
plotMesaData(mesa.data,18,type="obs")
plotMesaData(mesa.data,18,type="res")
plotMesaData(mesa.data,18,type="acf")

Run the code above in your browser using DataLab