X hits on this document

47 views

0 shares

0 downloads

0 comments

1 / 12

Fuentes’ LAB NOTES:

www4.stat.ncsu.edu/~fuentes/dukelab

DATASETS NEEDED:

coalash.dt (Coal Ash dataset)

www4.stat.ncsu.edu/~fuentes/coalash.txt

davis.txt  (topographic heights)

www4.stat.ncsu.edu/~fuentes/davis.txt

ozone.txt (ozone values)

www4.stat.ncsu.edu/~fuentes/ozone.txt

climate.txt (climate data frame)

www4.stat.ncsu.edu/~fuentes/climate.txt

Named the 3 files coalash.txt, davis.txt and ozone.txt in your directory.

software R with library geoR, fields and akima

These packages are not compatible with each other

Use command detach(package:fields) to detach packages.

This lab has 2 parts:

Part I:  spatial estimation, and

Part II: Bayesian spatial estimation and prediction

PART I

Estimating the spatial structure

##EXERCISE 1: How to plot the data and get empirical semivariograms

##EXERCESE 2: WNLS VARIOGRAM ESTIMATOR

##EXERCISE 3: REML

##EXERCISE 4: Profile likelihood

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

#Using geoR library

# download your data using read.table

# to learn more about read.table  type

# > ? read.table

coal.ash<-read.table('coalash.txt')

coal.m<-as.matrix(coal.ash)

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

davis.m<-as.matrix(davis.txt)[,1:3]

##EXERCISE 1: How to plot the data and get binned semivariograms

#TO PLOT THE DATA

X11()

plot.geodata(coords=coal.m[,2:3],data=coal.m[,4])

Document info
Document views47
Page views51
Page last viewedSat Dec 10 03:26:56 UTC 2016
Pages12
Paragraphs458
Words1924

Comments