Description Usage Arguments Details Value Author(s) References See Also Examples
Function that creates a data.frame of locations (and auxillirary information)
from STdata$covars
, used by createSTmodel
.
1 | processLocation(STdata, locations)
|
STdata |
|
locations |
A list specifying which fields in |
The locations
list specifies what should go in the locations data.frame,
in addition to thing listed below STdata$covars$ID
is always added.
Each of the fields below should contain names (as character) of columns in
STdata$covars
The x,y-coordinates for monitors
Alternative x,y-coordinates for monitors, used when computing distance-matrices for the beta- and nu-fields. Allows the use of non-stationary covariance structures thourgh the deformation method of Damian (2003), given a precomputed deformation.
The long,lat-coordinates for monitors
Additional fields in STdata$covars
that should be added
to the location data.frame
A data.frame with location information for all the sites.
Johan Lindstrom
D. Damian, P. D. Sampson, P. Guttorp. (2003) Variance modeling for nonstationary processes with temporal replications. J. Geophys. Res.: D24(108)
Other STmodel functions: createCV
,
createDataMatrix
,
createSTmodel
,
dropObservations
,
estimateBetaFields
,
loglikeSTdim
, loglikeST
,
predictNaive
, processLUR
,
updateCovf
,
updateTrend.STdata
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ##load the data
data(mesa.data.raw)
##and create STdata-object
mesa.data <- createSTdata(mesa.data.raw$obs, mesa.data.raw$X, n.basis=2,
SpatioTemporal=mesa.data.raw["lax.conc.1500"])
##specify locations, using x/y and specifying long/lat and picking
##type as an additional field
loc.spec <- list(coords=c("x","y"), long.lat=c("long","lat"), others="type")
##create the location data.frame
str( processLocation(mesa.data, loc.spec) )
##specify only locations
str( processLocation(mesa.data, list(coords=c("x","y"))) )
##different coordinates for beta and nu fields
loc.spec <- list(coords=c("x","y"), coords.nu=c("long","lat"))
str( processLocation(mesa.data, loc.spec) )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.