Last chance! 50% off unlimited learning
Sale ends in
createSTmodel
, and compare the covariates
requested (both geographic and spatio-temporal) with
those available in STdata
.processLUR(STdata, LUR.in) processST(STdata, ST.in)
STdata
object with observations,
covariates, trends, etc; see mesa.data
.formula
; or a ST
specification as a character vector.LUR.in
[object Object],[object Object],[object Object],[object Object] For the two last
options the vector/list-elements can contain either:
[object Object],[object Object],[object Object] Setting
any element(s) of the list to NULL
implies
only an intercept for the corresponding temporal
trend(s). ST.in
should be a vector specifying the
spatio-temporal covariates to use; the vector either give
names or layers in STdata$SpatioTemporal
to use,
compare character
and integer
options for
LUR.in
above.
If covariates are specified using names these should
match
dimnames(STdata$SpatioTemporal)[[3]]
,
unmatched elements are dropped with a warning.
createCV
,
createDataMatrix
,
createSTmodel
,
dropObservations
, loglikeST
,
loglikeSTdim
, loglikeSTnaive
,
predictNaive
,
processLocation
, updateCovf
##load the data
data(mesa.data)
##create a simple set of covariates
processLUR(mesa.data, list(c(7:9),7,8))
##or a structure with the same covariates for all
##temporal trends
processLUR(mesa.data, c(7,11))
##or a structure with only intercept for the temporal trends
processLUR(mesa.data, list(c(7:9),NULL,NULL))
##Ask for covariates by name
processLUR(mesa.data, list(c("log10.m.to.a1","log10.m.to.a2"),
"log10.m.to.a1","log10.m.to.a1"))
##use formula for part of it
processLUR(mesa.data, list(~log10.m.to.a1+log10.m.to.a2+log10.m.to.a1*km.to.coast,
"log10.m.to.a1", "log10.m.to.a1"))
##Ask for non-existent covariate by name or formula, or location
##for each temporal trend)
try(processLUR(mesa.data, list("log10.m.to.a4",~log10.m.to.a1+log10.m.to.a4, 25)))
##create a simple set of spatio-temporal covariates
processST(mesa.data, 1)
##or create a empty set of spatio-temporal covariates
processST(mesa.data, NULL)
##by name
processST(mesa.data, "lax.conc.1500")
Run the code above in your browser using DataLab