X hits on this document

42 views

0 shares

0 downloads

0 comments

7 / 12

[1,]    2  3.5

[2,]    4  5.5

# this is the same as before for krige.bayes, but now we

# specify where you want to predict, by using the locations argument:

davis.bpred<-

krige.bayes( coords=davis.m[,1:2],data=davis.m[,3],

locations=loci,prior=prior.control(phi.discrete=seq(0, 3, l=21)))

davis.bpred$predictive$simulations

davis.bpred$predictive$mean

davis.bpred$predictive$variance

# 803.0342 735.7671

# 369.3989 461.2960

#Bayesian predictive distributions:

par(mfrow=c(2,1)

hist(davis.bpred$predictive$simulations[1,])

hist(davis.bpred$predictive$simulations[2,])

#

#

# If you want a nugget prior, instead of nugget=0,

#say nugget= c(1,2,5,6)

# or any other vector with the values of the discrete uniform prior

# of nugget/partial sill. Example:

coal.b2<-krige.bayes(coords=coal.m[,2:3],data=coal.m[,4],

prior=prior.control(tausq.rel.prior="uniform",

            tausq.rel.discrete=seq(0,0.5,l=6),

            phi.discrete=seq(0,3,l=25)))

X11()

par(mfrow=c(1,4))

hist(coal.b2$posterior$sample$beta)

hist(coal.b2$posterior$sample$sigmasq)

hist(coal.b2$posterior$sample$phi)

hist(coal.b2$posterior$sample$tausq.rel)

#Notice that here tausq.rel means relative nugget (nugget divided by the

# partial sill). So the argument is defining a discrete prior for the relative

# nugget with support points at 0, 10%, 20%, ... 50%

Document info
Document views42
Page views46
Page last viewedMon Dec 05 21:14:29 UTC 2016
Pages12
Paragraphs458
Words1924

Comments