##load the data
data(mesa.data)
##create a simple set of covariates
LUR.1 <- construct.LUR.basis(mesa.data, list(c(1:3),1,2))
str(LUR.1)
##or a structure with the same covariates for all
##temporal trends
LUR.2 <- construct.LUR.basis(mesa.data, c(1:2))
str(LUR.2)
##or a structure with only intercept for the temporal trends
LUR.3 <- construct.LUR.basis(mesa.data, list(c(1:3),NULL,NULL))
str(LUR.3)
##Ask for covariates by name
LUR.4 <- construct.LUR.basis(mesa.data, "log10.m.to.a1")
str(LUR.4)
##Ask for non-existent covariate by name (produces a warning)
LUR.5 <- construct.LUR.basis(mesa.data, "log10.m.to.a4")
str(LUR.5)
##create a simple set of spatio-temporal covariates
ST.1 <- construct.ST.basis(mesa.data, 1)
str(ST.1)
##or create a empty set of spatio-temporal covariates
ST.2 <- construct.ST.basis(mesa.data, NULL)
str(ST.2)
Run the code above in your browser using DataLab