Last week I posted a query (below) about geobugs. In the following
replies it is clear to see that almost nobody is using the GeoBugs
interface as intended. It seems that almost everybody is using other
existing software to build work-arounds to do the adjacency matrix
generation and the mapping of simulation output. Perhaps the real
question is not whether bugs will have a GIS interface, but whether bugs
will be incorporated as an extention into existing GIS software. With
all the new flexibility in calling bugs remotely, it might be easier to
build bugs extensions to each GIS system, then to try to duplicate even
basin analysis and display functions of an existing GIS. Anyway, thanks
for all the replies, Finn
From James Thompson [[log in to unmask]]
I'm using the links among WinBUGS <--> R/Splus <--> Arcview 3.2 with the
latter linkage mediated by the SPlus for Arcview and SPlus Spatial
modules. I'm sure you'll find lots more sophistication so please share
the results.
From Ernesto Calvo [[log in to unmask]]
I am not sure if this would help but I am doing number 3, processing
in bugs and sending the results to Arcview. I also had problems
transfering the maps and I like the other things I can do with ArcView
so I've already settled for spending a few times at the begining and end
of the analyses.
I read my ArcView DBF into Stata and use bugsdat.ado to transfer the
variables into bugs (including the x,y coordinates) which is easy.
Because I run winbugs from R (using Gelman's code which is great), all
results from bugs are objects in R which I transfer back into stata, and
then merge into the dbf. Then I can plot the results in ArcView. Because
I have both R and stata scripts for those things it usually takes me
only a couple of minutes (and mapping is generally the first and last
things I do so it is not too bad). For contiguity matrix I usually use
Anselin's script in ArcView to produce the matrix which is quite similar
to that in bugs format.
Is not pretty but I generally have no problem in getting things in and
out. If this is a feasible alternative I can send you the scripts.
From John Sprague [[log in to unmask]]
I have made some trial runs in GeoBUGS using my own maps. These
experiments have been using various ArcView versions and now using
ArcGIS8.3 under XP. There is an extraordinarily useful piece of free
software for dealing with these matters called GeoDa - largely the work
of
Luc Anselin. It can be downloaded from the CSISS site at Santa
Barbara:
http://www.csiss.org/aboutus/news.php3#a56
GeoDa accepts ArcView files (also ArcGIS8.3 files) and in GeoDa with
a
standard polygon shapefile input you can generate a matrix of first
order
connections using various algorithms. This matrix output is in (one
version of) sparse matrix format. GeoDa's menu indicates it will
generate
higher order matrices but it does not do so, rather it will generate the
first order binary connections no matter which order you ask
for. Presumably greater functionality will be added in future. The
package has some very nice routines for doing variants on Moran's I,
Lisa's, and Moran's I scatterplots. Using the Queen algorithm in GeoDa
produces output that is ultimately compatible with GeoBUGS. I have an
S-PLUS script that generates full order (not sparse) matrices through
adjacency order 10 that are then very easy to manipulate to obtain the
needed input for GeoBUGS. I would be happy to send you the script if
you
are interested. I also have a few S-PLUS functions that facilitate
generating spatial lags and calculating Moran's I and such like. One of
the functions generates row standardized weight matrices starting with
adjacency matrices. I would be happy to send you the functions (they
are
commented and very short) if you want. I am not a programmer so the
code
in the script as well as in the functions is basic emeritus political
science professor hammer and tongs. My interest has been in polygon
data -
census block groups, tracts, voting precincts - and I have studied
homicide
distributions (rare events) and aggregate voting patterns (common
events)
with spatial techniques but only trial runs in GeoBUGS where I ran some
homicide examples just to see if I could. If you would like to see it I
could try to find that *.odc file as well.
From Glen D. Johnson [[log in to unmask]]
With regard to issue 3, I've used MapBasic to extract an adjacency
matrix from MapInfo coverages. The same should be do-able with visual
basic/ARC GIS . I'll gladly share the Map Basic code, but not sure how
helpful it would be if you're in ArcInfo or ARC GIS. Perhaps you can
follow the logic of the code and reproduce it in another language. It's
not that long. Anyhow, I recall doing some intermediate work in excel to
insert all the commas as needed. Also note that WINBUGS needs to have
all the polygons coded numerically as 1,2,3, ... . So, say if you have
counties or census tracts labeled with FIPS codes, you want to convert
them to numeric integer labels, starting with 1.
If you have a GIS, why use anything but the GIS for displaying final
results? If any results from WINBUGS are tied to the original mapping
units, export the data, then import it to your GIS, then join and map
the new attribute data. You'll have a much more powerful data
management and mapping tool with the GIS then you ever will with
geobugs. As an example, I choose in winbugs to display stats on the
posterior distributions of smotthed values for each mapping polygon,
thus yielding a table of percentiles, etc for each polygon. Save that as
a text file, then you can bring it into excel, or whatever, and add a
column of labels (such as FIPS codes) that allows you to join the table
to a mappable table in your GIS.
From Gentry White [[log in to unmask]]
I did take a Missouri map from ARCGIS and put it into GeoBUGS, I don't
remember all the details, but as I recall there was a bit of work
involved, you can't just take an ungenerate file and dump it into
GeoBUGS, you need to make a header and ID the regions. I know that
there are some things not covered explicitly in the manual, as with all
things BUGS. Good luck.
From Colin P. Stark [[log in to unmask]]
You can use Info to manipulate the format and values of any record,
although I don't recall the exact commands right now - they're easy to
find. I have, in the past, been forced to run AML scripts to adjust
records so that ungenerate output was given in both the correct units
and with sufficient decimal places - I am sure you could simply scale up
the coords (using an Info math command) to preserve the precision in
integer form, then adjust the width of each record (remember that Arc
idiotically truncates fields that don't fit the record width, inc when
ungenerating).
My original post:
I am starting to try to use geobugs on my own maps an I am running into
problems that don't appear to be addressed in the geobugs manual. If
you have experience converting arcinfo maps into geobugs input files
(throght the UNGENERATE command) I would be interested in finding out:
1. geobugs seem to take only integer x,y coordinates. Is this true?
Is there an easy way in arcinfo of reprojecting coordinate systems to
get integer coordinates?
2. Is there a format for coding donut shape polygons (like a polygon
with another polygon in the middle of it)? In some gis these are coded
anti-clockwise or with a negative identifier.
3. Are people doing Arc/bugs the other way around? Are people making
Arcinfo or arcview applications that create adjacency matricies, passing
this to bugs, taking the results, and posting these back to the arc
display?
4. If you have read this far, but havn't solved any of these problems,
I would still be interested in your experiences in getting Arcinfo
coverages into geobugs. There does not seem to be a lot of chatter on
the group about geobugs, so I am wondering if it is actually being used
as intended.
-------------------------------------------------------------------
This list is for discussion of modelling issues and the BUGS software.
For help with crashes and error messages, first mail [log in to unmask]
To mail the BUGS list, mail to [log in to unmask]
Before mailing, please check the archive at www.jiscmail.ac.uk/lists/bugs.html
Please do not mail attachments to the list.
To leave the BUGS list, send LEAVE BUGS to [log in to unmask]
If this fails, mail [log in to unmask], NOT the whole list
|