Professional Documents
Culture Documents
An Introduction To: A Package For Geostatistical Data Analysis Using The Software and
An Introduction To: A Package For Geostatistical Data Analysis Using The Software and
http://www.leg.ufpr.br/geoR/
A package for geostatistical data analysis using the R software Paulo J. Ribeiro Jr. and Peter J. Diggle
Illustrative session geoRglm Links
An Introduction to geoR
Click for an illustrative session with some of the capabilities of the package !his document is also available as a vignette !he vignettes files are currentl" not distributed with the package but are available here#
o o
geoRintro pdf$ the document in pdf format geoRintro Rnw$ the source vignette file
1. geoR
Installation files geoR/+ '-0 tar g1 %package source ( Linu2 and 3ni2.
geoRwithtests tar g1 %source files including the tests director". 45!6# this is a much bigger distribution file and t"picall" not necessar" for regular users.
"ews C7A486S describes the latest changes in the package geoR 4otice this file is also included in the package distribution under .../doc/CHANGES
2.
geoR/+ '-0 tar g1 %package source ( Linu2 and 3ni2. geoR/+ '-0 tg1 %for 9ac5S : users. geoR/+ '-0 1ip %for ;indows users.
3.
(ld versions
4.
)icense is available as <ree Software under the terms of the <ree Software <oundation=s 843 8eneral Public License
geoR
Please note that as free package* geoR is supplied without any warranty.
2.
&iting geoR! If "ou use geoR please cite the following reference#
RI>6IR5 ?R $ P ? and DI88L6$ P ? %*&&+. geoR# A package for geostatistical anal"sis R-46;S @ol +$ 4o * ISS4 +A&)-,A,+
>ook
,odel-based Geostatistics Series# Springer Series in Statistics Diggle$ Peter ? C Ribeiro ?r$ Paulo ?ustiniano *&&A$ :$ *,& p $ 7ardcover IS>4-+&# &-,D'-,*)&'-* IS>4-+,# )'D-&-,D'-,*)&'-) !he book webpage
2.
Illustrative session <or a first contact with the package we strongl" recommend the web-page with an illustrative session !his document is also available in compressed postscript and pdf formats# pdf format %geoRintro pdf. postscript format %geoRintro ps g1.
3.
.utorials Link for a collection of tutorials illustrating several aspects of the usage of the geoR package
4. geoR! 5.
6.
0elp files are available for the functions in the package in the standard format <or e2ample$ to see the documentation for the function likfit %which performs ma2imum likelihood estimation.$ Bust t"pe during an R session %after loading the package.#
> help(likfit)
If the command help.start() is previousl" t"ped$ help pages in html format (web style) can be seen using a browser$ e g <irefo2 ;e remind that in order to visualise html help files ;indows users should also t"pe optio s(helpht!l"#R$E) before help.start() !his is not necessar" for other operating s"stems
7.
Related publications !he publications listed here illustrate the usage and some of the capabilities of geoR !he geostatistical anal"sis and graphics were performed using the package resources
8.
(riginal technical report announcing the package release RI>6IR5 ?R$ P ? A4D DI88L6$ P ? %+))). geo!: A geostatistical library for ! "#$!% !echnical report S!-))-&)$ Dept of 9aths and Stats$ Lancaster 3niversit" To download this report in compressed postscript (.ps) format, click for the file with: 2 pages per sheet (double page) or 1 page per sheet (single page). % )ast update# +) 4ov *&&&. 1AR"I"G! Please note that several changes have been made in the software since the release of the above document$ which nevertheless remains valid as an introductor" guide to the package
!he version currentl" available is alread" an updated version of the original document and might be further updated to reflect changes in the package
9.
2ugs is still in development and there ma" be missing or broken features ;e welcome usage and bugs reports as well as feature suggestions
geoR
which ma" be sent b" e-mail to !he file C7A486S describes bugs alread" fi2ed$ up to the currentl" available version
;hat is R F web page or to the more general R proBect web page Click to download R$ for R manuals including an Introduction to R go to the R 9anuals web page$ and to learn what=s new in the R proBect have a look at the R%Ne&s$ downloadable in %pdf and %ps formats
<or more details about statistical anal"sis and programming using R see# @enables C Riple" %+))). and @enables C Riple" %*&&&. <or a e2tensive list of publications related to R and !"#L$! see the R publications list
Acknowledge ents
geoR=s
development has benefited from the usage(bug report$ contributions and comments from several users ;e thank them all for their valuable input Remaining bugs are the authors= sole responsibilit"
, 62plorator" !ools , + Plotting data locations and values , * 6mpirical variograms 0 Parameter 6stimation - Cross-@alidation A Spatial Interpolation ' >a"esian Anal"sis D Simulation of 8aussian Random <ields ) Citing geoR
http://www.leg.ufpr.br/geoR/geoRdoc/vignette/geoRintro/
http!//www.leg.ufpr.br/doku.phpLaboratorio
de Estadstica y Geoinformacin
de las A!(ricas
2a3+ (,--) .1 33/1%31.1 '4 5o3 16781 CE' 81-31%667 % C9riti:a % 'ara ; 5rasil
Seminarios y mini-cursos LEG : Ver horario! Programe LEG : fechas eventos como defensas, seminarios, conferencias, etc relacionados con el Grupo de Expertos Eventos anteriores
Vea al!unas fotos del evento photo album LEG Libros Publicados Compaeros de papel "nformes #$cnicos, suplementos en lnea de artculos,
La p,!ina -.'(E/.( LEG contiene varios conse0os 1tiles 2ue la !ente utili)a los recursos de computacin LEG La p,!ina utili)a el LEG 3i4i contiene la definicin de las normas 2ue utili)amos para este 3i+i, as como conse0os y enlaces 2ue pueden ayudar en el uso de este recurso 5tilice esta p,!ina para hacer nuevas su!erencias para el desarrollo de este *i+i y crear o unirse a las listas de discusin 6 Definiciones y normas de este Wiki se mantendr en esta pgina , as como consejos para el uso de enlaces y til cuanto Wikis, sugerencias para el desarrollo de este wiki y listas de discusin 7
%,!inas internas de inter$s restrin!idos a los profesores y los usuarios conectados a los recursos Admistra89o LEG p,!ina sobre cmo dar formato a texto en la *i+i 6do+u*i+i7
'ave!ar a trav$s de la lista de usuarios re!istrados en el *i+i, los !rupos a los 2ue pertenecen (Esta es la lista completa de los usuarios y grupos wiki piernas)
Nota: para cada grupo hay una lista de correo electrnico de la manera asociada gr9po<l=leg.9fpr.:r !ara cada grupo "ay una lista de correo electrnico asociada
P ginas personales
Lista de los nombres de los participantes 2ue tienen p,!inas personales en orden alfab$tico 6participantes con p,!inas *eb personales en esta *i+i7
%,!inas -ursos
Los cursos regulares impartidos en U!P"
: E-;<<= ; E : Estadstica "", -lase E > E-;<<= ; El : Las estadsticas de -lase "" = E-;>>= : Estadstica -omputacional ? -E;<<@ : "ntroduccin a la Aioestadstica B E-;<BB : Aioestadstica;A C E-;<<= ; A : Estadstica "" -lase A
#tros cursos
: -urso y material de pro!rama en el & 2. Geoestadstica y estadstica espacial #emas -urso de Verano "DE E 5(%, <=E<: al :CE<>E><<F 6post!rado7 3. Dinicurso modelos !eoestadsticos imparten en (EAG&. E &A&A( ><<F ? Gisciplina %G: "ntroduccin a la Geoestadstica dadas en E(ALH E 5(% ><:<
Los proyectos con asociaciones institucionales externos 6proyectos con vnculos externos7
: -itrus (udden Geath 6con Jundecitrus7 > %royecto saludables, vi!ilancia de Aedes huevos en &ecife 6Jiocru), "'%E, East E 5JDG7 3. Geomedicina proyecto 6con el "nstituto;%el$ %rincipito7 ? D$todos 6!eo7 para estadstica evaluacin de las poblaciones de peces 6"%"DA&7 B Dodelado de datos lon!itudinales 6con E'(%;Jiocru)7 C Estimabilidade medidas de asociacin y de ries!o en casos y controles Estudios Espaciales 6con 5'"-AD% E J".-&5K E ELE#E&7 F El an,lisis de microarrays 6con "AD%;Jiocru)7 @ Los m$todos cuantitativos y el medio ambiente I El se!uro de cosecha: modelos estadsticos y de precios 6%royecto %&.-AG7
Enlaces
$sociaciones
.&"E'#E : Laboratorio de Estadstica Espacial, 5JDG &ed (AL5GAALE : asociaciones (AL5GAALE( 'et*or+ G%";"'%E : Givisin de %rocesamiento de "m,!enes del "'%E ep!eos : Laboratorio de An,lisis Espacial de Gatos epidemiol!icos, 5nicamp
Sociedades Cient%&icas
AAE : Asociacin ArasileMa de Estadstica &A&A( : &e!in ArasileMa de #"A( 6La (ociedad "nternacional de Aiometra7 (AE Econometric (ociety brasileMa: "(A&A : -aptulo ArasileMo de "(AA 6(ociedad "nternacional para el An,lisis Aayesiano7
Eventos
'(a ")"$S , %iracicaba, <B;<IE<BE><:> 5J%& 5niversidad Jederal de %aran, -=(L -entro de -omputacin -ientfica y (oft*are Libre 5J%& PPGE$ : %ro!rama de %os!rado en "n!eniera Ambiental PPG*NE : %ro!rama de %os!rado en D$todos 'um$ricos en "n!eniera
Enlaces en U!P"
Per%odo <=E<: a :CE<>E><<F .or rios e Locais #er8as: :C:<< Ns :@:<< 6A;:=I7 Huartas: :?:<< Ns :C:<< 6A;:=I7 e :C:<< Ns :@:<< 6-E-;C7 Huintas: :<:<< Ns :>:<< 6A;:=I7 *inistrante %rof %aulo /ustiniano &ibeiro /r, LEG: Laboratrio de Estatstica e Geoinforma89o, 5J%&
Aula : sobre estatstica espacial Geoestatstica 6atuali)a8Qes peridicas7 Estudos de -aso: dados de &on!elap e GRmbia os dados utili)ados nos exemplos, aulas pr,ticas e exerccios est9o disponveis na !eo& eEou neste lin+ os tutoriais mencionados nas pr,ticas e exerccios fa)em parte da sess9o de tutoriais da p,!ina da geoR
Semana / 012-13-1/4
#ericas: "ntrodu89o a estatstica espacial #ipos de problemas de estatstica espaciais e id$ias b,sicas para an,lise e modela!em Geoestatstica: problemas b,sicos e al!uns exemplos 2ue ser9o usados neste curso 6-aptulo :7
%r,tica: Apresenta89o e introdu89o ao uso dos recursos computacionais a serem utili)ados neste curso: &, &;(patial, !eo&, !eo&!lm 6ver lin+s no final desta p,!ina7 : > neste primeira semana foi dada Snfase no entendimento da estrutura e uso do sistema & e seus pacotes 5m tutorial 2ue fornece informa8Qes sobre o uso dos recursos do & para estatstica espacial e ilustra al!umas t$cnicas de an,lise para diferentes tipos de dados espaciais
Exerccios #ericas: uma vis9o !eral de !eoestatstica 6-aptulo >7 e modelos !aussianos para dados !eoestatsticos 6-aptulo =7 1. 6><<F7 Ar2uivo com os comandos utili)ados no -aptulo > de Gi!!le O &ibeiro %r,ticas: ferramentas para an,lise exploratria !eoestatstica, fun8Qes b,sicas para an,lise, simula89o de dados 1. > Visite este tutorial, reprodu)a as an,lises e explore os comandos e funcionalidades com os dados fornecidos eEou seus prprios dados idem para este outro tutorial 2ue mostra an,lises de dados de -#- do solo A -#- $ uma medida de fertilidade de solos Exerccios #ericas: Estima89o de parRmetros 6-aptulo B, exceto (e89o B B7 e %redi89o Espacial 6-aptulo C7 %r,ticas: . ob0etivo desta sess9o $ explorar as funcionalidades para estiva89o de parRmetros do modelo !eoestatstico Visite o tutoriais abaixo, reprodu)a, discuta e interprete as an,lises 'este ponto voce pode i!norar a parte de predi89o espacial 6krigagem7 : > dados de condutividade hidr,ulica do solo outras an,lises deste e de ouitros dados Exerccios
Semana 5 06-//-1/4
Semana 2 0/7-/8-1/4
Semana 3 052-53-1/4
#ericas: Dodelos lineares !enerali)ados !eoestatsticos 6-aptulo ?7 e inferSncia 6(e89o B B7 e "nferSncia Aayesiana para modelos !eoestatsticos lineares e lineares !enerali)ados 6-aptulo F7
%r,ticas: . ob0etivo desta pr,tica $ explorar a implementa89o no pacote geoR de inferSncia Aayesiana para modelos Gaussianos %ara isto recomenda;se a an,lise de dados 0, vistos anteriormente utili)ando a fun89o krige.:a>es()
Exerccios #ericas: Estudos de casos: exemplos comentados e detalhados de an,lise de dados 6ve0a os ar2uivos utili)ados e editados7 %r,ticas: o ob0etivo $ efetuar an,lises de GLGD utili)ando o pacote !eo&!lm : > 3. ? Visite a p,!ina do pacote e inspecione a documenta89o disponvel simule um con0unto de dados de um GLGD use al!ortmos da !eo&!lm para obter estimativas de parametros via $#$#%likeli"ood idem para inferSncia a predi89o Aayesianas Exerccios #ericas: Dais estudos de casos em GLGD ExtensQes do modelo: sobrevivSncia espacial, processos pontuais, processos pontuais marcados Gelineamentos !eoestatsticos 6-aptulo @7
Semana 7
%r,ticas: An,lise de dados do trabalho do curso #ericas: Al!umas alternativas para modela!em espa8o temporal #picos adicionais em estatstica espacial: fundamentos de carto!rafia e ("G, processos pontuais e dados de ,reas . %acote aR#
Semana (
Avalia89o
Aiblio!rafia
Esta lista possui diversas referSncias biblio!r,ficas separadas pelos tipos de assunto cobertos pelos textos
Espa8o Aberto
%,!ina aberta N edi89o pelos participantes do curso
Lin+s
: & pro0ect *eb pa!e > & 3i+i: principal 3i+i do & 6em "n!lSs7 = 5m curso sobre o uso do & ? #inn;& G5"EEditor 6disponvel apenas para o ambiente & sob 3indo*s7 B & (patial tas+ vie* and &;("G;Geo resources C !eo& *eb pa!e F !eo&!lm *eb pa!e @ %auloTs *eb pa!e http://www.leg.ufpr.br/doku.php/disciplinas:verao2007
Exerccios
Semana /
: %roduce a plot of the &on!elap data in *hich a continuous colour scale or !rey scale is used to indicate the value of the emission count per unit time at each location, and the t*o sub;areas *ith the B by B sub;!rids at B< metre spacin! are sho*n as insets > -onstruct a poly!onal approximation to the boundary of #he Gambia -onstruct plots of the malaria data *hich sho* the spatial variation in the values of the observed prevalence in each villa!e and of the !reenness covariate = 6:7 -onsider the elevation data as a simple re!ression problem *ith elevation as the response and north;south location as the explanatory variable Jit the standard linear re!ression model usin! ordinary least s2uares Examine the residuals from the linear model, *ith a vie* to decidin! *hether any more sophisticated treatment of the spatial variation in elevation mi!ht be necessary ? 6>7 Jind a !eostatistical data;set *hich interests you " 3hat scientific 2uestions are the data intended to addressU Go these concern estimation, prediction, or testin!U
"dentify the study region, the design, the response and the co&ariates, if any 3hat is the support of each responseU 3hat is the underlyin! signalU "f you *ished to predict the si!nal throu!hout the study re!ion, *ould you choose to interpolate the response dataU
Jor these data, consider the same 2uestions as *ere raised in Exercise : ? C &ead the -hapter > of Gi!!le O &ibeiro 6><<F7 6you can !et this chapter here7
Semana 5
1. 6=7 load the data sets para a, ?sat e ca07 available in geoR usin! commands such as:
data(para a)
and the documentation describin! each data set *ith the help() function
help(para a)
%erform exploratory data analysis and build a model you find suitable for each data > 6=7 "n the examples above, *ould you have other candidate models for each data; setU 3. "nspect an example !eoestatistical analysis for the hydraulic conductivity data ? 6?7 -onsider the follo*in! t*o models for a set of responses, a se2uence of positions " , *here and alon! a one;dimensional spatial axis are parameters and the are mutually associated *ith
""
*here the
are as in 6a7 but ' and ( are no* random variables, , each *ith mean )ero and
Jor each of these models, find the mean and variance of covariance bet*een and for any
and the
either model, *ould it be possible to distin!uish bet*een themU B 6B7 (uppose that and follo*s a multivariate Gaussian distribution *ith can be expressed as 3rite and and
is +no*n Giscuss ho* you *ould use these expressions to find is un+no*n
C 6C7 "s the follo*in! a le!itimate correlation function for a one;dimensional spatial process U Give either a proof or a counter;example
: 6F7 -onsider the follo*in! method of simulatin! a realisation of a one;dimensional spatial process on -hoose a set of points , *ith mean )ero, variance : and correlation function Let denote the correlation matrix of as *here is a dia!onal
matrix *hose non;)ero entries are the ei!envalues of smallest Let distribution,
be an independent random sample from the standard Gaussian #hen the simulated realisation is
2. 6F7 3rite an R function to simulate realisations usin! the above method for any specified set of points and a ran!e of correlation functions of your choice
= 6F7 'o* investi!ate ho* the appearance of your realisation e2uation above you replace the dia!onal matrix you replace the last ei!envalues by )eros
chan!es if in the
Semana 2
: 6@7 Jit a model to the surface elevation data assumin! a linear trend model on the coordinates and a Dat$rn correlation function *ith parameter 5se the fitted
model as the true model and perform a simulation study 6i e simulate from this model7 to compare parameter estimation based on maximum li+elihood, restricted maximum li+elihood and vario!rams > 6I7 (imulate ><< points in the unit s2uare from the Gaussian model *ithout measurement error, constant mean e2uals to )ero, unit variance and exponential correlation function *ith
.btain parameter
estimates 6usin! maximum li+elihood7: assumin! a isotropic model try to estimate the anisotropy parameters -ompare the results and repeat the exercise for = 6:<7 -onsider a stationary trans;Gaussian model *ith +no*n transformation function , let VxV be an arbitrary Jind explicit expressions for
: 6::7 Analyse the %aran, data;set or any other data set of your choice assumin! priors obtainin!:
a map of the predicted std errors over the area a map of the probabilities of bein! above a certain 6arbitrarily7 chosen threshold over the area a map of the :<th, >Bth, B<th, FBth and I<th percentiles over the area the predictive distribution of the proportion of the area *ith the value of the study variable belo* a certain threshold 6as a su!!estion you can use the =<th percentile of the data as the value of such a threshold7
Semana 3
: 6:>7 -onsider the stationary Gaussian model in *hich stationary Gaussian process *ith mean )ero, variance function , *hilst the are mutually independent , *here is a
Assume that all parameters except predictive distribution of an improper uniform prior, the ordinary +ri!in! formulae
> 6:=7 Jor the model assumed in the previous exercise, assumin! a correlation function parametrised by a scalar parameter for:
and assumin! the remainin! parameters are +no*n prior for and assumin! the correlation
a normal;scaled;inverse; prior
prior for
= 6:?7 Analise the %aran, data;set or any other data set of your choice assumin! priors for the model parameters and obtainin!:
the posterior distribution for the model parameters a map of the predictive mean over the area a map of the predictive median over the area the predictive distribution at three arbitrary selected locations *ithin the area
? 6:B7 .btain simulations from the %oison model as sho*n in Ji!ure ? : of the text boo+ for the course B 6:B7 #ry to reproduce or mimic the results sho*n in Ji!ure ? > of the text boo+ for the course simulatin! a data set and obtainin! a similar data;analysis Note: for the example in the boo+ *e have used set seed()*) C 6:C7 &eproduce the simulated binomial data sho*n in Ji!ure ? C 5se the pac+a!e geo+glm in con0unction *ith priors of your choice to obtain predictive distributions for the si!nal at locations and -ompare the
predictive inferences *hich you obtained in the previous exercise *ith those obtained by fittin! a linear Gaussian model to the empirical lo!it transformed data, !enerally -ompare the results of the t*o previous analysis and comment
Semana '
: 6:F7 #he composite likeli"ood 6-L7 is obtained by the product of independent distributions for pairs of variables at data locations Assume a Gaussian model *ith constant mean and isotropic exponential correlation function
*rite do*n the expression of the -L and discuss ho* parameter estimates could be obtained *rite do*n a code to obtain -L parameter estimates for the s:<< data set and compare *ith the ones !iven by DL and &EDL
http!//cran.at.rpro3ect.org/src/contrib/Archive/geoR/nd e/ of /src/contrib/Archive/geoR
"a e )ast odified #i4e Description Parent Director" geoR/+ &-& tar g1 *D-9a"-*&&+ &D#** A&+L geoR/+ &-0 tar g1 &D-?un-*&&+ &)#,* AD*L geoR/+ &-- tar g1 &)-?un-*&&+ **#,D AD*L geoR/+ &-A tar g1 *&-?un-*&&+ &D#+A ADDL geoR/+ &-' tar g1 &*-?ul-*&&+ &'#0+ '+)L geoR/+ &-D tar g1 &,-Aug-*&&+ +*#+* '**L geoR/+ +-* tar g1 *D-4ov-*&&+ &D#0A ',-L geoR/+ +-- tar g1 +D-Dec-*&&+ +&#-0 ',AL geoR/+ *-& tar g1 &+-<eb-*&&* +,#&- '0*L geoR/+ *-+ tar g1 +,-<eb-*&&* &D#0A '-*L geoR/+ *-* tar g1 &*-Apr-*&&* +A#&* '-*L geoR/+ *-, tar g1 &,-Apr-*&&* +D#*+ '-*L geoR/+ *-0 tar g1 &)-Apr-*&&* +D#0+ '-*L geoR/+ *-- tar g1 +--Apr-*&&* +D#&A '-*L
geoR/+ *-D tar g1 geoR/+ ,-& tar g1 geoR/+ ,-+ tar g1 geoR/+ ,-* tar g1 geoR/+ ,-, tar g1 geoR/+ ,-- tar g1 geoR/+ ,-A tar g1 geoR/+ ,-' tar g1 geoR/+ ,-D tar g1 geoR/+ ,-) tar g1 geoR/+ ,-+& tar g1 geoR/+ ,-++ tar g1 geoR/+ ,-+* tar g1 geoR/+ ,-+- tar g1 geoR/+ ,-+A tar g1 geoR/+ 0-* tar g1 geoR/+ 0-, tar g1 geoR/+ 0-0 tar g1 geoR/+ 0-- tar g1 geoR/+ 0-' tar g1 geoR/+ 0-D tar g1 geoR/+ 0-) tar g1 geoR/+ --* tar g1 geoR/+ --, tar g1 geoR/+ --0 tar g1 geoR/+ --- tar g1 geoR/+ --A tar g1 geoR/+ --' tar g1 geoR/+ A-0 tar g1 geoR/+ A-- tar g1 geoR/+ A-A tar g1 geoR/+ A-D tar g1 geoR/+ A-++ tar g1 geoR/+ A-+, tar g1 geoR/+ A-+0 tar g1 geoR/+ A-+- tar g1
+D-?un-*&&* +'#,& + &9 +)-?ul-*&&* &)#,& *+-L &+-Aug-*&&* +A#+) ,-+L &+-Aug-*&&* *&#*) ,-+L *&-Aug-*&&* +'#*, ,-,L ,&-Aug-*&&* &D#-0 ,-0L +D-Sep-*&&* &)#+& ,),L *'-4ov-*&&* +&#-A ,D-L &,-Dec-*&&* *+#** * +9 *&-?an-*&&, +*#00 **AL +&-9ar-*&&, ++#,' **DL +A-?un-*&&, +0#,& **)L ,&-?un-*&&, +,#-) *,+L &0-Sep-*&&, &D#,& *0&L +D-Sep-*&&, +&#*+ *,*L &'-?an-*&&0 &D#,, *,,L ,&-?an-*&&0 +)#&+ ADDL ,+-?an-*&&0 +*#00 D*DL ,&-9ar-*&&0 +-#-A D,*L &--9a"-*&&0 ++#,+ ,D*L &)-Aug-*&&0 *+#*D 0,&L +)-Sep-*&&0 &D#*+ ,)'L +'-4ov-*&&0 +*#0+ ,)0L *+-Dec-*&&0 +*#*+ ,)DL +)-?an-*&&- +0#*& 0&+L &)-<eb-*&&- +0#0+ 0&+L +&-9a"-*&&- +&#&* 0&,L &D-?un-*&&- ++#0- 0&0L +0-<eb-*&&A +�- 0+'L +--<eb-*&&A +&#+A 0+'L +&-?un-*&&A +0#+D 0+'L +)-?ul-*&&A +)#&* 0+DL &0-5ct-*&&A *+#0D 0+DL &+-?an-*&&' +-#*, 0+)L +*-Apr-*&&' +*#,& 0*&L &*-5ct-*&&' *+#-+ 0,&L
geoR/+ A-+A tar g1 geoR/+ A-+' tar g1 geoR/+ A-+) tar g1 geoR/+ A-*& tar g1 geoR/+ A-*+ tar g1 geoR/+ A-** tar g1 geoR/+ A-*, tar g1 geoR/+ A-*- tar g1 geoR/+ A-*' tar g1 geoR/+ A-*D tar g1 geoR/+ A-*) tar g1 geoR/+ A-,& tar g1 geoR/+ A-,* tar g1 geoR/+ A-,, tar g1 geoR/+ A-,0 tar g1 geoR/+ A-,- tar g1 geoR/+ A-,A tar g1 geoR/+ '-+ tar g1 geoR/+ '-* tar g1 geoR/+ '-, tar g1
&,-5ct-*&&' &)#0A 0,&L &0-5ct-*&&' **#,0 0,&L *,-4ov-*&&' &)#** 0,+L *D-4ov-*&&' +0#0D 0,+L *'-Apr-*&&D +'#*) 0,DL +0-5ct-*&&D ++#*& 0-,L &)-Dec-*&&D +D#+& 0-*L +)-<eb-*&&) &D#-) 0-,L +--5ct-*&&) +'#+0 0--L &--?ul-*&+& +,#*+ 0-'L +*-Aug-*&+& +A#,* 0-)L &)-Sep-*&+& +D#-0 0-)L &--5ct-*&+& +&#*0 0-)L +--9ar-*&++ &)#+0 0-)L &'-Apr-*&++ +D#0& 0-)L +D-9a"-*&++ &A#-0 -,-L &,-4ov-*&++ +'#-- 0&+L ++-4ov-*&++ &A#*, 0&+L &*-<eb-*&+* +*#** 0&*L *)-?un-*&+* *,#-+ 0&,L
Geoestatstica
Getalhes da oferta da disciplina
: Per%odo: se!undo semestre de ><:>, no pro!rama de ps !radua89o de estatstica e experimenta89o a!ronWmica da E(ALHE5(% 2. *atr%culas e in&orma9:es: com (olan!e de Assis %aes (abadin 6sola ge.sa:adi ?:??, ramal >=: = Pro&essor "espons vel: %aulo /ustiniano &ibeiro /r, 6LEG: Laboratrio de Estatstica e Geoinforma89o7 3; <atas: +,-+0(&) '; .or rios e Locais:
%& 9sp.:r7, na secretaria do pro!rama, #elefone: 6:I7 =?>I;
*&-*+(&)
&0-&-(+&
As aulas ser9o na Lab $ de microcomputadores e na sala =:: 6=o andar7 Xor,rio: Huintas e (extas, @:<< Ns :>:<< e :?:<< Ns :@:<<
&eferSncias Aiblio!r,ficas
Lista de referSncias para o curso
Dateriais do -urso
Apresenta89o da primeira aula -ap : e > de Gi!!le O &ibeiro Geoestatstica: transparSncias do curso An,lises do dados de &on!elap e GRmbia
%ro!ramas computacionais
%ro!rama b,sico do curso : 2. 3. #he & pro0ect for (tatistical -omputin!: p,!ina do pro!rama " 5m material sobre o uso do & pacotes do ": !eo& e !eo&!lm &ecursos auxiliares : 2. 3. 4. do B & Video #utorial for (patial (tatistics com uma introdu89o ao & e !eoestatstica 6usando o pacote !stat7 &studio um ambiente para se trabalhar com o & . #inn;& $ um G5"EEditor para o ambiente & sob 3indo*s 2ue facilita muito o uso do & neste ambiente operacional . Lemacs $ uma outra op89o de editor 2ue facilita a edi89o de ar2uivos e" Editor de texto ambiente 3indo*s : . Di4#eL disponibili)a ar2uivos de instala89o para
Espa8o Aberto
%,!ina aberta para edi89o pelos participantes do curso
geoR
A package for geostatistical data analysis using the R software Paulo J. Ribeiro Jr. and Peter J. Diggle
Illustrative session geoRglm Links
An Introduction to geoR
Click for an illustrative session with some of the capabilities of the package !his document is also available as a vignette !he vignettes files are currentl" not distributed with the package but are available here#
o o
geoRintro pdf$ the document in pdf format geoRintro Rnw$ the source vignette file
Installation files geoR/+ '-0 tar g1 %package source ( Linu2 and 3ni2.
geoRwithtests tar g1 %source files including the tests director". 45!6# this is a much bigger distribution file and t"picall" not necessar" for regular users.
"ews C7A486S describes the latest changes in the package geoR 4otice this file is also included in the package distribution under .../doc/CHANGES
2.
geoR/+ '-0 tar g1 %package source ( Linu2 and 3ni2. geoR/+ '-0 tg1 %for 9ac5S : users. geoR/+ '-0 1ip %for ;indows users.
3.
(ld versions
4.
)icense is available as <ree Software under the terms of the <ree Software <oundation=s 843 8eneral Public License
geoR
Please note that as free package* geoR is supplied without any warranty.
2.
&iting geoR! If "ou use geoR please cite the following reference#
RI>6IR5 ?R $ P ? and DI88L6$ P ? %*&&+. geoR# A package for geostatistical anal"sis R-46;S @ol +$ 4o * ISS4 +A&)-,A,+
1.
>ook
,odel-based Geostatistics Series# Springer Series in Statistics Diggle$ Peter ? C Ribeiro ?r$ Paulo ?ustiniano *&&A$ :$ *,& p $ 7ardcover IS>4-+&# &-,D'-,*)&'-* IS>4-+,# )'D-&-,D'-,*)&'-) !he book webpage
2.
Illustrative session <or a first contact with the package we strongl" recommend the web-page with an illustrative session !his document is also available in compressed postscript and pdf formats# pdf format %geoRintro pdf. postscript format %geoRintro ps g1.
3.
.utorials Link for a collection of tutorials illustrating several aspects of the usage of the geoR package
4. geoR! 5.
pdf format %geoR pdf. dvi format %geoR dvi. compressed postscript format %geoR ps g1.
6.
0elp files are available for the functions in the package in the standard format <or e2ample$ to see the documentation for the function likfit %which performs ma2imum likelihood estimation.$ Bust t"pe during an R session %after loading the package.#
> help(likfit)
If the command help.start() is previousl" t"ped$ help pages in html format (web style) can be seen using a browser$ e g <irefo2 ;e remind that in order to visualise html help files ;indows users should also t"pe optio s(helpht!l"#R$E) before help.start() !his is not necessar" for other operating s"stems
7.
Related publications !he publications listed here illustrate the usage and some of the capabilities of geoR !he geostatistical anal"sis and graphics were performed using the package resources
8.
(riginal technical report announcing the package release RI>6IR5 ?R$ P ? A4D DI88L6$ P ? %+))). geo!: A geostatistical library for ! "#$!% !echnical report S!-))-&)$ Dept of 9aths and Stats$ Lancaster 3niversit" To download this report in compressed postscript (.ps) format, click for the file with: 2 pages per sheet (double page) or 1 page per sheet (single page). % )ast update# +) 4ov *&&&. 1AR"I"G! Please note that several changes have been made in the software since the release of the above document$ which nevertheless remains valid as an introductor" guide to the package !he version currentl" available is alread" an updated version of the original document and might be further updated to reflect changes in the package
9.
2ugs is still in development and there ma" be missing or broken features ;e welcome usage and bugs reports as well as feature suggestions
geoR
which ma" be sent b" e-mail to !he file C7A486S describes bugs alread" fi2ed$ up to the currentl" available version
;hat is R F web page or to the more general R proBect web page Click to download R$ for R manuals including an Introduction to R go to the R 9anuals web page$ and to learn what=s new in the R proBect have a look at the R%Ne&s$ downloadable in %pdf and %ps formats
<or more details about statistical anal"sis and programming using R see# @enables C Riple" %+))). and @enables C Riple" %*&&&. <or a e2tensive list of publications related to R and !"#L$! see the R publications list
Acknowledge ents
geoR=s
development has benefited from the usage(bug report$ contributions and comments from several users ;e thank them all for their valuable input Remaining bugs are the authors= sole responsibilit"
62perimentos com delineamento inteiramente casuali1ados 62perimentos com delineamento em blocos ao acaso 62perimentos em esNuema fatorial !ransformaIJo de dados 62perimentos com fatores hierKrNuicos AnKlise De CovariOncia 62perimentos 6m Parcelas Subdivididas Sobre os ministrantes do curso About this document
http://www.leg.ufpr.br/plane%p/plane%p/
http://www.leg.ufpr.br/doku.php/cursos:ruel
http://www.leg.ufpr.br/&paulo'us/()001/
;. &$
o
+ (urr1culo+2344)* +
=. )ivro
Model-based Geostatistics+ *eries:+*pringer+*eries+in+*tatistics+ 5iggle-+/eter+6.+7+Ribeiro+6r-+/aulo+ 6ustiniano+ 2007-+8-+230+p.-+9ardcover+ :*;<$10:+0$3#7$32"07$2+ :*;<$13:+"7#$0$3#7$32"07$"+
4he+book+webpage
+ geoR ++ +:+programa+gratuito+e+de+c=digo+aberto+para+
an0lise+geostat1stica e+o+pro'eto+complementar+ ++ geoRglm ++ +:+para+modelos+ lineares+generali>ados+espaciais.
o o
+ aR4 ++ +:+3/:+R$4)RR32:;
+ m!R +:+mecanismo+para+acoplar+o+R+a+outros+
aplicativos
+ Rcitrus+e+str2attlice +:+pacotes+implementando+
m?todos+de+an0lise+de+padr@es+espaciais+de+doenAas+ de+plantas
D. Pro3etos
o
+ Daterial+curso+sobre+o+programa+ + + estat1stico ++ ++ R ++ ++ ministrado+na+)mbrapa-+;ras1lia-+5E-+ + 30/0H+a+03/0I+de+200H+Feste+material+tem+sido+ atuali>ado+desde+entBoG + Daterial+curso+sobre+o+programa+ + + estat1stico ++ ++ R ++ ++ ministrado+na+)*32J/C*/+em+/iracicaba++ */ + /lane'amento+de+)%perimentos + + *istema+R+para+computaABo+estat1stica +-+C)2-+ 2ondrina-+5e>+2007 inistradas na +@PR %segundo se estre -
o o
KraduaABo
/=s$graduaABo
inistradas na +@PR e
se estres
5isciplina+de+graduaABo
+ ()$003:+)stat1stica+::-+turma+)+F)ngenharia+ + 3mbientalG + ()$003:+)stat1stica+::-+turma+L+F(iMncia+da+ + (omputaABoG + ()$003:+)stat1stica+::-+turma+K+F)ngenharia+ + DecNnicaG + ()$223:+)stat1stica+(omputacional+ + F)stat1sticaG + ()$0HI:+Eundamentos+de+geoestat1stica+ + F)stat1sticaG + ()$223+)stat1stica+(omputacional-+primeiro ++ semestre+2007 + ()$0I3:+4=picos+)speciais+de+)stat1stica+ + F)stat1sticaG + ()$001+;ioestat1stica + + ()$0HI+Eundamentos+de+Keoestat1stica +: + ()$003+)stat1stica+:: + + ()$227+:nferMncia+;a!esiana + + ()$22#:+2aborat=rio+:+F)stat1sticaG + + ()$20"+:nferMncia+)stat1stica+: + + ()$210+:nferMncia+)stat1stica+:: +
5isciplina+de+p=s$graduaABo+na+CE/R+e+outros+ locais
+ ()$714:+Keoestat1stica+aplicada + + ()$71#:+D?todos+(omputacionalmente+ + :ntensivos + ()$701:+;ioestat1stica+3vanAada+: + + D349$4I0:+Keostatistics ++FCniversit!+of+ 2ancaster-+COG + D349$4IH:+)nvironmental+ + )pidemiolog!+FCniversit!+of+2ancaster-+COG + K**)$401:+*tatistical+Dethods+in+*cientific+ + Research+FCniversit!+of+2ancaster-+COG
#ociedades 5stat?sticas!
++ R** ++:+Ro!al+*tatistical+*ociet!
;a!esian+3nal!sis
++ :*;3 +:+:nternational+*ociet!+for+
&ontato!
E-mail: Endere 5epartamento+de+)stat1stica+ co: *etor+de+(iMncias+)%atas+ Cniversidade+Eederal+do+/aran0+ (uritiba-+/R+$+;rasil+ #1.H31+$+""0 Sala: Fone: Fa : *alas+do+2)K-+no+pr?dio+do+antigo+salBo+de+provas HH+41+33I1$3H73+FsalaGP+F HHG+F41G+F33I1+3I00G+10H3+10II+FQL:/G+ou+ 33I1$3141+Fsecretaria+do+5eptoG HH+F0G+41+33I1$3141
Link para L68# LaboratGrio de 6statHstica e 8eoinformaIJo$ 3<PR Link para PKgina e P? no wiki do L68 Link para L6S!6# LaboratGrio de 6statHstica 6spacial$ 3<98 Link para R-br# lista de discussJo sobre o R$ em portugues Link para Departamento de 6statHstica$ 3<PR
odels!
Diggle$ P ? $ !awn$ ? A and 9o"eed$ R A %+))D. 9odel-based geostatistics %with discussion. Appl% !tatist% CF$ *))-,-& Qhang$ 7 %*&&*. 5n estimation and prediction for spatial generalised linear mi2ed models 'iometrics DG$ +*)-+,A Christensen$ 5 < and ;aagepetersen$ R P %*&&*. >a"esian prediction of spatial count data using generali1ed linear mi2ed models 'iometrics DG$ *D&-*DA Diggle$ P ? $ 9o"eed$ R A $ Rowlingson$ > $ !homson$ 9 %*&&*. Childhood malaria in the 8ambia # a case-stud" in model-based geostatistics Applied statistics D:$ 0),--&A Qhang$ 7 %*&&,. 5ptimal interpolation and the effectiveness of cross-validating variogram in spatial generalised linear mi2ed models )ournal of computational and graphical statistics :;$ A)D-'+, 5le < Christensen$ 8areth 5 Roberts and 9artin SkRld %*&&A. Robust 9arkov chain 9onte Carlo methods for spatial generalised linear mi2ed models )ournal of ,omputational and Graphical !tatistics :D +-+' %Abstract. Christensen$ 5 < %*&&0. 9onte Carlo ma2imum likelihood in model-based geostatistics )ournal of computational and graphical statistics :=$ '&*-'+D Diggle$ P ? $ Ribeiro ?r$ P ? and Christensen$ 5 < %*&&,. An introduction to modelbased geostatistics In # !patial statistics and computational methods %ed ? 9Sller.$ Springer @erlag$ 0,-DA Christensen$ 5 < and Ribeiro ?r$ P ? %*&&*. geoRglm - a package for generalised linear spatial models R News$ ;%*.$ *A-*D ISS4 +A&)-,A,+ %Download . 5nl" the last three articles are reflected reasonabl" well in the implementation in package geoRglm
#hort @AH!
.he ,&,&-algorith see s not to be i/ing well. 1hat to do I !he general solution is to make longer run=s It is not unusual for me when doing >a"esian inference to make *$&&&$&&& iterations$ storing ever" *$&&& !he problem is most pronounced when phi is random and a normal prior with a large variance is used for beta !he solution here is to use the flat prior for beta instead of the normal Is inference for the nugget i ple ented I !he relative nugget ta9s@.rel is fi2ed when doing >a"esian inference I have no plans allowing a prior on ta9s@.rel for two reasons # +. I do not know how meaningful priors should look likeT *. <or computational reasons$ having a discrete prior on both phi and ta9s@.rel reNuires that a large number of matrices are precomputed and stored 9a2imum likelihood estimation of the relative nugget is possible using either 9C9C-9L6$ which is implemented in the function likfit glsm$ or 9C9C-69$ which has not "et been implemented Are i proper priors dangerous to use I 4ot alwa"s$ but the resulting posterior distribution ma" not e2ist %be improper. <or the priors implemented in the geoRglm the posterior is proper$ apart from when using the reciprocal prior for sigmasN where the posterior becomes improper
Proble
seed ! If "ou get an e2ecution error like EE.Ra do!.seedA7B is ot a Calid Nor!al t>pe==$ the problem is that the random seed is not defined A solution is f e2 to call r or!(1) once before calling the function in geoRglm ,ultivariate analysis ! is not implemented in the package In particular the anal"sis of the 9alaria data in Diggle et al %*&&*. cannot be replicated using geoRglm ,arkov chain ,onte &arlo 5, ! as in Qhang *&&* is not "et implemented Return to the geoRglm home page
with rando
Reading data and e/ploratory analysis# a tutorial on first steps of the data anal"sis
#i ulating fro the geostatistical odel! simulations using the function grf illustrating different aspects of the geostatistical model Ani ated ;D si ulations! %be patientU this ma" take a while to load in "our browser. the generalised linear geostatistical odel
, #i ulating fro
=. Illustrating geostatistical calculations step by step + 5/a ple on the si ple kriging algorith * 5/a ple of so e geostatistical calculations , &onstructing a covariate and obtaining the confidence interval for the coeficcient 0 Jriging with covariates# e2ample on how to construct a covariate on the prediction points to be used in the kriging calculations
-
Jriging in presence of covariates! a note# comments on the usage of the arguments trend%l and trend%d
C. Generic tutorials
1.
A traditional geostatistical data analysis# e2ample of the basic steps for a simple geostatistical anal"sis
Some commands for a standard geostatistical analysis! illustrate the package s"nta2 for e2plorator" anal"sis %including variograms.$ parameter estimation and kriging prediction An introduction to geoR# web page with the main functionalit" of the package geoR &o ands file with contents shown during a pratical session during a short course on geostatistics A basic e/a ple of a geostatistical anal"sis of a soil conductivit" data-set using R/geoR Ket another e/a ple of the steps of a data anal"sis
3.
An e/a ple of 2ayesian prediction# Illustrates the usage of the geoR=s function &rige%bayes() <urther e2amples for the function krige.:a>es are given in the file e-amples%&rige%bayes%R
2.
E. 2ivariate geostatistical data + #i ulating bivariate proccess# * Inference and prediction for the bivariate Gaussian co co ponent odel# F. (ther data-sets %in addition to the ones already included in the package' Data this is a director" with data-sets used in some of the tutorials !"picall" there are two files corresponding to each data set# o files with e2tension .dat are the data files o files with e2tension .t/t are files with a brief e2planation on the data
2.
on
geoR and sp! converting data for ats + ,onverting &riging results to !patialGrid.ata/rame and !patial"i-els.ata/rame formats
G. (ther tutorials
An introduction to geoRgl # web page with the main aspects of the package geoRgl #i ulating stochastic proccesses# simulation routines to illustrate basic concepts of stochastic proccesses
paulo0us A1 ufpr%br Last modified# !ue Dec +A +*#&,#*A >RS! *&&DLast revision# A april *&&A