Package 'Spdep'

Total Page:16

File Type:pdf, Size:1020Kb

Package 'Spdep' Package ‘spdep’ September 7, 2021 Version 1.1-11 Date 2021-09-07 Title Spatial Dependence: Weighting Schemes, Statistics Encoding UTF-8 Depends R (>= 3.3.0), methods, sp (>= 1.0), spData (>= 0.2.6.0), sf Imports deldir, boot (>= 1.3-1), graphics, grDevices, utils, stats, Matrix, LearnBayes, MASS, coda, expm, gmodels, nlme, units, s2, e1071 Suggests spatialreg (>= 1.1-1), parallel, dbscan, rgeos, RColorBrewer, lattice, xtable, maptools (>= 0.5-4), foreign, igraph, RSpectra, knitr, rgdal, classInt, tmap, spam, ggplot2, rmarkdown, tinytest URL https://github.com/r-spatial/spdep/ BugReports https://github.com/r-spatial/spdep/issues/ Description A collection of functions to create spatial weights matrix objects from polygon 'contiguities', from point patterns by distance and tessellations, for summarizing these objects, and for permitting their use in spatial data analysis, including regional aggregation by minimum spanning tree; a collection of tests for spatial 'autocorrelation', including global 'Morans I' and 'Gearys C' proposed by 'Cliff' and 'Ord' (1973, ISBN: 0850860369) and (1981, ISBN: 0850860814), 'Hubert/Mantel' general cross product statistic, Empirical Bayes estimates and 'Assunção/Reis' (1999) <doi:10.1002/(SICI)1097-0258(19990830)18:16%3C2147::AID- SIM179%3E3.0.CO;2-I> Index, 'Getis/Ord' G ('Getis' and 'Ord' 1992) <doi:10.1111/j.1538-4632.1992.tb00261.x> and multicoloured join count statistics, 'APLE' ('Li 'et al.' ) <doi:10.1111/j.1538-4632.2007.00708.x>, local 'Moran's I' ('Anselin' 1995) <doi:10.1111/j.1538-4632.1995.tb00338.x> and 'Getis/Ord' G ('Ord' and 'Getis' 1995) <doi:10.1111/j.1538-4632.1995.tb00912.x>, 'saddlepoint' approximations ('Tiefelsdorf' 2002) <doi:10.1111/j.1538-4632.2002.tb01084.x> and exact tests for global and local 'Moran's I' ('Bivand et al.' 2009) 1 2 <doi:10.1016/j.csda.2008.07.021> and 'LOSH' local indicators of spatial heteroscedasticity ('Ord' and 'Getis') <doi:10.1007/s00168-011-0492-y>. The implementation of most of the measures is described in 'Bivand' and 'Wong' (2018) <doi:10.1007/s11749-018-0599-x>. 'spdep' >= 1.1-1 corresponds to 'spatialreg' >= 1.1-1, in which the model fitting functions are deprecated and pass through to 'spatialreg', but will mask those in 'spatialreg'. From versions 1.2-1, the functions will be made defunct in 'spdep'. For now 'spatialreg' only has functions from 'spdep', where they are shown as deprecated. 'spatialreg' only loads the namespace of 'spdep'; if you attach 'spdep', the same functions in the other package will be masked. Some feed through adequately, others do not. License GPL (>= 2) VignetteBuilder knitr RoxygenNote 6.1.1 NeedsCompilation yes Author Roger Bivand [cre, aut] (<https://orcid.org/0000-0003-2392-6140>), Micah Altman [ctb], Luc Anselin [ctb], Renato Assunção [ctb], Olaf Berke [ctb], Andrew Bernat [ctb], Guillaume Blanchet [ctb], Eric Blankmeyer [ctb], Marilia Carvalho [ctb], Bjarke Christensen [ctb], Yongwan Chun [ctb], Carsten Dormann [ctb], Stéphane Dray [ctb], Virgilio Gómez-Rubio [ctb], Martin Gubri [ctb], Rein Halbersma [ctb], Elias Krainski [ctb], Pierre Legendre [ctb], Nicholas Lewin-Koh [ctb], Angela Li [ctb], Hongfei Li [ctb], Jielai Ma [ctb], Abhirup Mallik [ctb, trl], Giovanni Millo [ctb], Werner Mueller [ctb], Hisaji Ono [ctb], Pedro Peres-Neto [ctb], Gianfranco Piras [ctb], Markus Reder [ctb], Jeff Sauer [ctb], R topics documented: 3 Michael Tiefelsdorf [ctb], René Westerholt [ctb], Levi Wolf [ctb], Danlin Yu [ctb] Maintainer Roger Bivand <[email protected]> Repository CRAN Date/Publication 2021-09-07 11:10:02 UTC R topics documented: aggregate.nb . .5 airdist . .6 aple .............................................7 aple.mc . .8 aple.plot . 10 autocov_dist . 11 bhicv . 13 card ............................................. 14 cell2nb . 15 choynowski . 17 columbus . 18 diffnb . 19 dnearneigh . 20 droplinks . 22 EBest . 24 EBImoran.mc . 25 EBlocal . 27 edit.nb . 29 eire ............................................. 30 geary . 30 geary.mc . 31 geary.test . 33 globalG.test . 35 Graph Components . 36 graphneigh . 38 grid2nb . 41 include.self . 42 invIrM . 43 is.symmetric.nb . 46 joincount.mc . 47 joincount.multi . 48 joincount.test . 50 knearneigh . 52 knn2nb . 54 lag.listw . 55 lee.............................................. 56 lee.mc . 57 4 R topics documented: lee.test . 59 listw2sn . 61 lm.LMtests . 62 lm.morantest . 64 lm.morantest.exact . 66 lm.morantest.sad . 68 localG . 70 localmoran . 72 localmoran.exact . 76 localmoran.sad . 78 LOSH............................................ 81 LOSH.cs . 83 LOSH.mc . 85 mat2listw . 86 moran . 88 moran.mc . 89 moran.plot . 91 moran.test . 92 mstree . 95 nb.set.operations . 96 nb2blocknb . 97 nb2INLA . 99 nb2lines . 100 nb2listw . 101 nb2listwdist . 103 nb2mat . 106 nb2WB . 108 nbcosts . 109 nbdists . 110 nblag . 111 oldcol . 112 p.adjustSP . 113 plot.mst . 114 plot.nb . 115 plot.skater . 116 poly2nb . 117 probmap . 119 prunecost . 121 prunemst . 122 read.gal . ..
Recommended publications
  • Progress in the R Ecosystem for Representing and Handling Spatial Data
    Journal of Geographical Systems https://doi.org/10.1007/s10109-020-00336-0 ORIGINAL ARTICLE Progress in the R ecosystem for representing and handling spatial data Roger S. Bivand1 Received: 9 October 2019 / Accepted: 8 September 2020 © The Author(s) 2020 Abstract Twenty years have passed since Bivand and Gebhardt (J Geogr Syst 2(3):307–317, 2000. https ://doi.org/10.1007/PL000 11460 ) indicated that there was a good match between the then nascent open-source R programming language and environment and the needs of researchers analysing spatial data. Recalling the development of classes for spatial data presented in book form in Bivand et al. (Applied spatial data analysis with R. Springer, New York, 2008, Applied spatial data analysis with R, 2nd edn. Springer, New York, 2013), it is important to present the progress now occurring in representation of spatial data, and possible consequences for spatial data handling and the statistical analysis of spatial data. Beyond this, it is imperative to discuss the relationships between R-spatial software and the larger open-source geospatial software community on whose work R packages crucially depend. Keywords Spatial data analysis · Open-source software · R programming language JEL Classifcation C00 · C88 · R15 1 Introduction While Bivand and Gebhardt (2000) did provide an introduction to R as a statistical programming language and to why one might choose to use a scripted language like R (or Python), this article is both retrospective and prospective. It is possible that those approaching the choice of tools for spatial analysis and for handling spatial data will fnd the following less than inviting; in that case, perusal of early chapters of Lovelace et al.
    [Show full text]
  • Conference Brochure S P E a K E R S
    04.07.2017 – 07.07.2017 www.user2017.brussels @useR_Brussels #user2017 CONFERENCE BROCHURE S P E A K E R S 2 As a student my use of R for data analyses was frowned upon - the suggestion was to stick with the existing software. P Access to R related literature was difficult. To admire R the very first R books one had to travel far, to the few enlightened universities. As a researcher I needed the help E of a secret floppy disk to dual boot into a GNU/Linux system with R, in order to escape from unnamed products. As a F starter in industry, people from unnamed companies made clear to my management that setting up R events for customers was A giving a ‘wrong signal to the market’. C Look how ‘wrong’ we have been... Fifteen years later R is shining brightly in the data science field. Students are E learning R before anything else and if statistics research is published without accompanying R package, it is considered a bad sign. Publishers have hundreds of books on display and major software houses are in a constant race against time to further integrate R into their product offerings. And now, more than 1000 people from all over the world have come to Brussels to discover the state of R at this conference. R has come a great way and the community that formed around the R project is and has always been critical to its success. The community has evolved in many ways and is active in many places throughout the year, but of all things the official useR conference still is the major community event of the year.
    [Show full text]
  • August 12-14, Dortmund, Germany
    AASC Austrian Association for Statistical Computing 2008 Program August 12-14, Dortmund, Germany useR! 2008, Dortmund, Germany 1 Contents Greetings and Miscellaneous 2 Maps 5 Social Program 8 Program 9 Tutorials 9 Schedule 10 List of Talks 14 2 useR! 2008, Dortmund, Germany Dear useRs, the following pages provide you with some useful information about useR! 2008, the R user con- ference, taking place at the Fakultät Statistik, Technische Universität Dortmund, Germany from 2008-08-12 to 2008-08-14. Pre-conference tutorials will take place on August 11. The confer- ence is organized by the Fakultät Statistik, Technische Universität Dortmund and the Austrian Association for Statistical Computing (AASC). Apart from challenging and likewise exciting scientific contributions we hope to offer you an attractive conference site and a pleasant social program. With best regards from the organizing team: Uwe Ligges (conference), Achim Zeileis (program), Claus Weihs, Gerd Kopp (local organiza- tion), Friedrich Leisch, and Torsten Hothorn Address / Contact Address: Uwe Ligges Fakultät Statistik Technische Universität Dortmund 44221 Dortmund Germany Phone: +49 231 755 4353 Fax: +49 231 755 4387 e-mail: [email protected] URL: http://www.R-Project.org/useR-2008/ Program Committee Micah Altman, Roger Bivand, Peter Dalgaard, Jan de Leeuw, Ramón Díaz-Uriarte, Spencer Graves, Leonhard Held, Torsten Hothorn, François Husson, Christian Kleiber, Friedrich Leisch, Andy Liaw, Martin Mächler, Kate Mullen, Ei-ji Nakama, Thomas Petzoldt, Martin Theus, and Heather Turner Conference Location Technische Universität Dortmund Campus Nord Mathematikgebäude / Audimax Vogelpothsweg 87 44227 Dortmund Conference Office Opening hours: Monday, August 11: 08:30–19:30 Tuesday, August 12: 08:30–18:30 Wednesday, August 13: 08:30–18:30 Thursday, August 14: 08:30–15:30 useR! 2008, Dortmund, Germany 3 Public Transport The conference site at the university campus and the city hall are best to be reached by public transport.
    [Show full text]
  • GEOG 4950/6950 Geospatial Analysis in R Day(S), Time, Place TBD
    GEOG 4950/6950 Geospatial Analysis in R Day(s), Time, Place TBD Dr. Emily Burchfield emily.burchfi[email protected] Office: NR 355B Office Hours: TBD 435-797-4089 Course Objectives By the end of this course, you will be able to: 1. Use R to summarize (spatial) data numerically and visually. 2. Explore (spatial) data patterns and relationships. 3. Conduct independent and reproducible research by applying techniques learned in class to novel datasets. DRAFT 4. Effectively communicate results and implications. 5. Critically assess data-driven assertions. Perhaps most importantly of all, you'll do this using the powerful, free, and open resources devel- oped by the community supporting the R programming language. These specific course objectives are connected to broader objectives to help you achieve greatness outside of the classroom: 1. Develop specific skills, competencies, and points of view needed by professionals. 2. Learn how to find and use resources for answering questions or solving problems. 3. Learn to analyze and critically evaluate ideas, arguments, and points of view. Prerequisites Basic understanding of statistics, introductory programming (Python, R, etc.), and/or geospatial software (i.e. ArcGIS, QGIS) is helpful, but not required. If you need additional resources to help get up to speed, check out the More Resources page on Canvas. 1 Course Materials Since we are working with open source tools, the resources we'll use in class are free. While there's no required textbook for the class, Applied Spatial Data Analysis with R by Roger Bivand, Edzer Pebesma, and Virgilio Gomez-Rubio is a fantastic resource. I will also frequently reference the R for Data Science text by Hadley Wickham, creator of dplyr and ggplot2 among other things.
    [Show full text]
  • Rtips. Revival 2012!
    Rtips. Revival 2012! Paul E. Johnson <pauljohn @ ku.edu> June 8, 2012 The original Rtips started in 1999. It became difficult to update because of limitations in the software with which it was created. Now I know more about R, and have decided to wade in again. In January, 2012, I took the FaqManager HTML output and converted it to LATEX with the excellent open source program pandoc, and from there I've been editing and updating it in LYX. From here on out, the latest html version will be at http://pj.freefaculty.org/R/Rtips. html and the PDF for the same will be http://pj.freefaculty.org/R/Rtips.pdf. You are reading the New Thing! The first chore is to cut out the old useless stuff that was no good to start with, correct mistakes in translation (the quotation mark translations are particularly dangerous, but also there is trouble with ~, $, and -. Original Preface (I thought it was cute to call this \StatsRus" but the Toystore's lawyer called and, well, you know. ) If you need a tip sheet for R, here it is. This is not a substitute for R documentation, just a list of things I had trouble remembering when switching from SAS to R. Heed the words of Brian D. Ripley, \One enquiry came to me yesterday which suggested that some users of binary distributions do not know that R comes with two Guides in the doc/manual directory plus an FAQ and the help pages in book form. I hope those are distributed with all the binary distributions (they are not made nor installed by default).
    [Show full text]
  • Reproducibility and Replicability Forum
    REPRODUCIBILITY AND REPLICABILITY FORUM Practical Reproducibility in Geography and Geosciences Daniel Nüsta 7 and Edzer Pebesmaa 7 aInstitute for Geoinformatics, University of Münster, 48149 Münster, Germany This is an Accepted Manuscript of an article published online by Taylor & Francis in Annals of the American Association of Geographers on 13 Oct 2020, available online: https://doi.org/10.1080/24694452.2020.1806028. ABSTRACT Reproducible research is often perceived as a technological challenge, but it is rooted in the challenge to improve scholarly communication in an age of digitisation. When computers be- come involved and researchers want to allow other scientists to inspect, understand, evaluate, and build upon their work, they need to create a research compendium that includes the code, data, computing environment, and script-based workflows used. Here, we present the state of the art for approaches to reach this degree of computational reproducibility, addressing liter- ate programming and containerisation, while paying attention to working with geospatial data (digital maps, GIS). We argue that all researchers working with computers should understand these technologies to control their computing environment, and we present the benefits of re- producible workflows in practice. Example research compendia illustrate the presented concepts and are the basis for challenges specific to geography and geosciences. Based on existing sur- veys and best practices from different scientific domains, we conclude that researchers today can overcome many barriers and achieve a very high degree of reproducibility. If the geogra- phy and geosciences and communities adopt reproducibility and the underlying technologies in practice and in policies, they can transform the way researchers conduct and communicate their work towards increased transparency, understandability, openness, trust, productivity, and innovation.
    [Show full text]
  • The Regress Function
    News The Newsletter of the R Project Volume 6/2, May 2006 Editorial by Paul Murrell signing clinical trials. Using Sweave in clinical prac- tice is the topic of Sven Garbade and Peter Burgard’s Welcome to the first regular issue of R News for 2006. article, while M. Wangler, J. Beyersmann, and M. This is a bumper issue, with a thirteen contributed Schumacher focus on length of hospital stay with the articles. Many thanks to the contributors and review- changeLOS package. ers for all of the enthusiasm and effort that they put Next, there are three graphics articles. Nitin Jain into these articles. and Gregory Warnes describe the “balloonplot”, a This issue begins with some “methodological” tool for visualizing tabulated data. Jung Zhao ex- papers. Peter Ruckdeschel, Matthias Kohl, Thomas plains how to produce pedigree plots in R, and Brian Stabla, and Florian Camphausen introduce their Ripley and I describe some improvements in R’s font distr package, which provides a set of S4 classes and support for PDF and PostScript graphics output. methods for defining distributions of random vari- SAS users struggling to make the transition to R ables. This is followed by an article from David Clif- might enjoy Søren Højsgaard’s article on his doBy ford and Peter McCullagh on the many uses of the package and the contributed articles are rounded out regress package, then Lukasz Komsta describes his by two pieces from Robin Hankin: one on the onion outliers package, which contains general tests for package for normed division algebras and one on outlying observations.
    [Show full text]
  • R Spatial and GIS Interoperability for Ethnic, Linguistic and Religious Diversity Analysis in Romania
    R Spatial and GIS Interoperability for Ethnic, Linguistic and Religious Diversity Analysis in Romania Claudiu VINȚE ([email protected]) The Bucharest University of Economic Studies Titus Felix FURTUNĂ ([email protected]) The Bucharest University of Economic Studies Marian DÂRDALĂ ([email protected]) The Bucharest University of Economic Studies ABSTRACT Diversity aspects, particularly ethnic, linguistic and religious ones, have be come global, capturing a large interest in being extremely sensitive recently. Tradition ally, these had been issues concerning only particular countries and/or regions, due to specifi c historical conditions. The recent waves of mass migration towards the wealth ier countries rose great problems regarding populations which come with radically dif ferent ethnic, linguistic and religious background compared to the local population. Our research is focused on analysing ethnic, linguistic and religious diversity in Romania, at Local Administrative Units level (LAU2), along with the segregation analysis regard ing the same aspects at county (NUTS3) and region levels (NUTS2) by integrating R processing fl exibility with and Geographic Information Systems (GIS) presentation abilities. R programming language offers support for developing integrated analysis solutions, based on specialized packages for computing diversity/segregation indices, in connection with packages that allow processing and visualising data geospatially, through interoperability with popular GIS, such as ArcGIS and QGIS. It is Romania census data that is employed as data source for analysis, with a focus on the latest census data from 2011. Keywords: R, GIS, Interoperability, Diversity Analysis, Segregation Analysis JEL classifi cation: C610, C880 1. INTRODUCTION By their nature, administrative-territorial units are observations that can be identifi ed by geographical locations.
    [Show full text]
  • A Glossary of R Jargon
    A Glossary of R jargon Below is a selection of common R terms defined first using Stata jargon (or plain English when possible) and then more formally using R jargon. Some definitions in Stata jargon are quite loose given the fact that they have no direct analog of some R terms. Definitions in R terms are often quoted (with permission) or paraphrased from S Poetry by Patrick Burns [3]. Apply The process of having a command work on variables or observations. Determines whether a procedure will act as a typical command or as a function instead. Also the name of a function that controls that process. More formally, the process of targeting a function on rows or columns. Also a function that does that. Argument The options that control what the commands do and the arguments that control what functions do. Confusing because in R, functions do what both commands and functions do in Stata. More formally, input(s) to a function that control it. Includes data to analyze. Array A matrix with more than two dimensions. All variables must be only one type (e.g., all numeric or all character). More formally, a vec- tor with a dim attribute. The dim controls the number and size of dimensions. Assignment function Assigns values like the equal sign in Stata. The two-key sequence, “<-”, that places data or results of procedures or transformations into a variable or data set. More formally, the two-key sequence, “<-”, that gives names to objects. Atomic object A variable whose values are all of one type, such as all numeric or all character.
    [Show full text]
  • John, It's My Great Pleasure to Have Published Five Books with You, for Which I've Thanked You Five Times in These Books
    John, it's my great pleasure to have published five books with you, for which I've thanked you five times in these books. I certainly don't want this farewell card to be the last chance to express my gratitude. It's sad to see you go, but I also feel pround of you for your illustrious career. I'm glad that you can finally devote time to your hobbies. I see youth in you regardless of your age. Before you becume to old to rimember me, let me inpress this great editer won more time with... typoes!!! Yihui Xie Dear John, Best wishes for a well-deserved retirement, John! You've been a wonderfully supportive editor and I'll be reluctant It was a pleasure to work with you, and thanks so to publish any more books without you! much for supporting Statistical Rethinking and Ben Baumer turning it into a successful book. All the best for your retirement, John! It has been wonderful All the best for retirement, to work with you on the books and I am grateful for your Richard McElreath encouragements all the way, incl. to a freshly graduated visiting professor in 1988! Merci and enjoy to the fullest this next stage. John, you played an important role in my academic life and Christian Robert really did so much to help in the success of all of my books. Best wishes in retirment. Dear John, Thank you for being my editor for all these years! I think we first worked together almost 20 years ago! It was real pleasure working with you.I am particularly Jim Albert appreciative that you believed in my data science book when there was so many books with similar titles already Was looking forward to Always a pleasure working out there.
    [Show full text]
  • R Foundation News by Martin Mächler and Kurt Hornik
    NEWS AND NOTES 190 R Foundation News by Martin Mächler and Kurt Hornik New R Foundation board Subsequent to meetings of the R Foundation in the summer of 2014, and after a careful nomination and voting process, the election of a new board of the R Foundation was finalized on December 1. The new board consists of Presidents: Duncan Murdoch, Martyn Plummer Secretary General: Martin Mächler Treasurer: Kurt Hornik Members at Large: John Chambers, Brian Ripley, Dirk Eddelbuettel Peter Dalgaard and Roger Bivand will serve as auditors. Our many thanks go to the outgoing board members, who have led the R Foundation during the years of phenomenal growth and success since its creation in April 2003: These are Robert Gentleman and Ross Ihaka, our past presidents, and Friedrich Leisch, the former Secretary General. New ordinary members The following new ordinary members were elected, as announced on September 15.1 Dirk Eddelbuettel, USA Torsten Hothorn, Switzerland Michael Lawrence, USA Martin Morgan, USA Marc Schwartz, USA Hadley Wickham, USA Achim Zeileis, Austria This brings the total number of ordinary members to 29. As always, the complete member- ship list, along with other details, is available at http://www.r-project.org/foundation/. Donations and new supporting members Donations Shannon Callan, USA Rees Morrison, USA Carlos Ortega, Spain New supporting members Jose M. Benitez, Spain Daniel Emaasit, USA Jay Emerson, USA Bastiaan Quast, Switzerland 1https://stat.ethz.ch/pipermail/r-announce/2014/000577.html The R Journal Vol. 6/2, December 2014 ISSN 2073-4859 NEWS AND NOTES 191 Martin Mächler ETH Zurich, Switzerland [email protected] Kurt Hornik WU Wirtschaftsuniversität Wien, Austria [email protected] The R Journal Vol.
    [Show full text]
  • Open Tools for Statistical Analysis in Spatial Data Infrastructures 1 Introduction
    Open Tools for Statistical Analysis in Spatial Data Infrastructures Benedikt Gr¨aler∗, Christoph Stasch∗, Benjamin Pross∗, Olav Peeters∗∗, Simon Jirka∗ ∗ 52◦North Initiative for Geospatial Open Source Software GmbH Martin-Luther-King-Weg 24, 48155 Muenster, Germany Corresponding author: Benedikt Gr¨aler,[email protected] ∗∗ Belgian Interregional Environment Agency (IRCEL - CELINE) Kunstlaan 10-12, B-1210 Brussel, Belgium Abstract Statistical analysis is performed with dedicated tools and software. A prominent example is the R software for statistical computing. We outline an ap- proach for integrating statistical analysis implemented in R into existing spatial data infrastructures using Open Source tools. Our approach is based on standards defined by the Open Geospatial Consortium (OGC), in particular the OGC Web Processing Service (WPS). The WPS offers an in- teroperable web service interface for describing and executing processes that transform some input to some output data (e.g. environmental models, GIS operators, etc.). In our approach, users can upload annotated R scripts to web processing services enabling their re-use by any interested party. The R packages SOS4R and sensorweb4R are used to flexibly assess spatio-temporal data from Spatial Data Infrastructures in R. The Un- certainty Model Language (UncertML) is used to integrate uncertainty measures in the results of the statistical processing. The usage of the software tools is illustrated by an application running at the Belgian Interregional Environment Agency. 1 Introduction For many statistical indicators, geographic locations play an essential role for the analysis, especially on an international scale. However, the data are provided by various companies, authorities and institutions across different countries posing a need for standardised interfaces to access, exchange and process the raw data as well as statistics derived from it.
    [Show full text]