X hits on this document

56 views

0 shares

0 downloads

0 comments

10 / 12

coal.wind2$krige.var

[1] 8.350462 1.362241

t(coal.wind2$beta[1:2,])

        [,1]      [,2]      [,3]

[1,] 7.467317 0.4058152 0.3430783

[2,] 7.030745 0.4716316 0.3130314

######################

## EXERCISE 3: ANISOTROPY.

#The function coords.aniso transform your coordinates

# into the coordinates in the new space where we have isotropy

# first one is  the rotation angle  (in radians) (psiA) and the second is psiR

# where psiR is

# the stretching parameter  

# and it is greater than 1, if lambda is 1 there is not

# stretching (these parameters can be estimated with likfit)

#

#

new.coord<-coords.aniso(coal.m[,2:3],aniso.pars=c(.2,3))

# do kriging for anisotropic case

coal.wind2 <-ksline(coords=coal.m[,2:3],data=coal.m[,4],locations=loci,

cov.pars=c(3,1),nugget=0,

cov.model="exponential",

m0="kt",trend=1,aniso.pars=c(.2,3))

#################################

##EXERCISE 4: Maps and Images

#use library akima and fields

X11()

ozone.txt<-read.table('ozone.txt')

      rx <- range(ozone.txt[,1])

      ry <- range(ozone.txt[,2])

#to obtain map of us within the limits rx (long) and ry (lat):

par(mfrow=c(1,1))     

US(xlim = rx, ylim = ry, lwd = 2, col = 1,add=F)

      surf<- interp(ozone.txt[,1], ozone.txt[,2], ozone.txt[,3])

#to create an image:

      image(surf$x,surf$y,surf$z, add = F,graphics.reset=T,col=topo.colors(12))

Document info
Document views56
Page views60
Page last viewedSat Jan 21 01:10:47 UTC 2017
Pages12
Paragraphs458
Words1924

Comments