# \dontshow{
##
library(spTDyn)
# Read data
data(NYdata);
# Define the coordinates
coords<-as.matrix(unique(cbind(NYdata[,2:3])))
# MCMC via Gibbs using default choices
set.seed(11)
post.gp <- GibbsDyn(formula=o8hrmax ~cMAXTMP+WDSP+tp(RH),
nItr=100,nBurn=0,
data=NYdata, coords=coords, scale.transform="SQRT")
print(post.gp)
##
# }
# \donttest{
##
###########################
## Attach library spTimer
###########################
library(spTDyn)
###########################
## The GP models:
###########################
##
## Model fitting
##
# Read data
data(NYdata);
# Define the coordinates
coords<-as.matrix(unique(cbind(NYdata[,2:3])))
# MCMC via Gibbs using default choices
set.seed(11)
post.gp <- GibbsDyn(formula=o8hrmax ~cMAXTMP+WDSP+tp(RH),
data=NYdata, coords=coords, scale.transform="SQRT")
print(post.gp)
##
# }
Run the code above in your browser using DataLab