sp {spTDyn} | R Documentation |
Defining spatially varying coefficients in the formula
Description
This function is used to define spatially varying coefficients within the formula for the Gaussian process spatio-dynamic and spatially varying coefficient process models.
Usage
sp(x)
Arguments
x |
The variable/covariate for which spatially varying coefficient is defined. |
See Also
Examples
##
###########################
## 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+sp(RH),
data=NYdata, coords=coords, scale.transform="SQRT")
print(post.gp)
[Package spTDyn version 2.0.2 Index]