Brad Carlin's Software Page
Also of potential interest is
spBayes,
a new R package for the analysis of point-level (geostatistical)
spatial hierarchical models. The package currently handles
normal observations in both univariate and multivariate settings;
spatiotemporal and non-normal (e.g., logistic) models are on the way!
-
PostCodes.rar is a rar file
containing the Fortran 90 and R code necessary
to produce three different summaries from the paper above:
-
the "cpar51" files are Fortran 90 programs that create the contents
of Table 5 (main effect posterior summaries)
-
the "density" files are also Fortran 90 programs that create the
fitted predictive density values plotted in Figure 3
-
the "maps.txt" file is an R program that creates
Figure 4 (the map of the fitted spatial frailties)
-
Data.rar is a .rar file
containing the original SEER data and the proposal covariance matrix for
beta used by the "cpar51" programs above.
-
Z_MCMCout.rar is a rar file
containing MCMC output from the "cpar51" programs that is used as
input to the "density" and "maps.txt" programs above.
Note that all downloads are currently set up to be saved in a
directory named F:/PostOnWeb/.
These programs were written by Ms. Luping Zhao during 2006-7
for Bayesian MPT model estimation, prediction, and frailty mapping.
-
This code is written in BRugs, the R package for calling
OpenBUGS from R. The necessary materials are described on a
separate website created by
Brian Hobbs,
current PhD student in the Division of Biostatistics at the University
of Minnesota.
Among other things, the code creates Figure 5 in the paper,
which is a plot of the empirical probabilities of equivalence
and non-equivalence by the true magnitude of the treatment effect.
-
For a gentler introduction to the BRugs language, including
basic installation instructions, you may wish to first check out
Brad's introduction to BRugs webpage.
These programs were written to perform fully Bayesian design
(i.e., to do sample size calculations) for both
drug and medical device clinical trials
using a binomial (alive/dead) response model, as well as for both
parametric (Weibull) and nonparametric (Cox) proportional hazards survival models.
-
bign.tar is a tar file
containing the data, C++ programs, and other support files needed to
create analogs of the spatial residual image plots shown in Figures 6 and 7 in the
above paper. This code uses a jittered version of the Minnesota
breast cancer data, and considers only the case r=0.5. The file
also contains an R program to draw the image plots themselves.
-
lbbfc_instructions.txt
gives instructions for unpacking and using all the material in the tar
file, assuming a Linux or Unix environment.
These programs were written by Mr. Shengde Liang during 2006 to
perform multiscale hierarchical modeling of very large geostatistical
(point level) datasets.
-
SEER_mod.odc gives the
WinBUGS code to fit the IID, Multivariate IID, independent CAR,
multivariate intrinsic autoregressive (MIAR), shared component
(SHARED-G and SHARED-C), and generalized multivariate CAR (GMCAR)
models described in the paper above.
-
SEER_dat.odc gives the
Minnesota county-level three-cancer SEER data analyzed in the
paper, along with related covariate and map adjacency information.
These programs were written by Ms. Haijun Ma, 12/22/06, to
perform multivariate areal smoothing and boundary analysis (wombling).
Both file should be opened in WinBUGS 1.4.
-
HHC_code.txt
contains *five files* of R code that implement the slice
sampler for the simplex parameterization for the smoothed ANOVA
example in Section 4.1 of the paper above.
These programs were written by Yi He during 2006, and edited by
James Hodges.
-
getEdges_code.txt gives the
R code to create areal wombling maps of the sort shown in
Figures 1(ef), 3(bd), 4, 5, 6, and 8 in the paper above.
-
tutorial.zip is a zip file
containing the previous file as well as all the other, supporting
files you'll need, including a nice zip-code level example.
These programs were written by Ms. Haijun Ma, 5/24/06, to
perform areal smoothing and boundary analysis (wombling)
for arbitrary areal maps (including those created from .shp files,
using ArcView 8.x or earlier)
-
code_MVC.txt gives the
WinBUGS code to fit the global (Sec 3.1), local areal (Sec 3.2), and
local edge (Sec 3.3) spatial smoothing models.
-
plot_MVC.txt gives the
R code to produce the figures in the paper; this file in turn
sources the utility file
MVCmvPlot.txt
into R so Minnesota county-level choropleth maps can be drawn.
These programs were written by Ms. Haijun Ma, 8/15/05, to
perform areal smoothing and boundary analysis (wombling)
for the Minnesota county map.
The approach uses
WinBUGS 1.4, followed by
R.
Lu, H., Reilly, C.S., Banerjee, S., and Carlin, B.P. (2007),
``Bayesian areal wombling via adjacency modeling,"
to appear Environmental and Ecological Statistics.
-
lrbc.R,
an R program written by Ms. Haolan Lu, 8/20/05,
to carry out the areal wombling method
described in the paper, and
carlin-beta-wombling.dll,
a .dll needed to call a C function in the former code from R.
This code essentially carries out a single replication of the
simulation study reported in Table 2 of the paper.
-
LC_wombling.txt, a WinBUGS/S-plus
program written by Ms. Haolan Lu, 6/28/05, to
perform posterior probability areal wombling for the Minnesota county map.
Both wombled boundaries and associated standard errors are produced,
similar to Figure 6 in the paper.
The file uses
WinBUGS 1.4, followed by
S-plus.
-
df-callbugs.R, an R
program written by Ms. Haolan Lu, 11/10/04,
to compute the mean and percentiles of the
degrees of freedom parameter "rho" appearing in the first two
lines of Table 2 of the paper. The file calls
the
WinBUGS 1.4 file
simple-poisson-model.txt from R using Andrew Gelman's
bugs.R function.
-
GMCAR.txt, an OpenBUGS program
written by Mr. Xiaoping Jin, 10/7/04 (modified 12/9/05),
to fit the full GMCAR model to the Minnesota lung and esophagus
cancer data in Section 5 of the paper.
-
FiveMCAR.zip,
a zipped file containing the C and R code to run the chosen model
from this paper (a five-dimensional MCAR model). Code
written by Mr. Xiaoping Jin, 10/31/03; revised 12/22/04.
-
ModelXI.bug, a WinBUGS 1.4 program
written by Ms. Xu Guo, 3/1/03,
to fit "Model XI", the chosen joint (longitudinal plus survival)
model in the paper. Full posterior inferential results are obtained
via MCMC sampling.
-
ModelXII.bug, a WinBUGS 1.4 program
written by Ms. Xu Guo, 6/26/03,
to fit "Model XII", a slightly more general joint
model that allows the hazard function to vary with time.
Full posterior inferential results are obtained
via MCMC sampling.
-
LongEventExp.sas, SAS Proc
SORT, MIXED, LIFEREG, and NLMIXED code
written by Dr. Oliver Schabenberger, 3/21/03,
to fit Model XI above. Estimation of random effects is
now via empirical Bayes, with associated standard errors
obtained by the delta method.
-
LongEventExp2.sas, SAS Proc
SORT, MIXED, LIFEREG, and NLMIXED code
written by Dr. Oliver Schabenberger, 6/27/03,
to fit Model XII above. Estimation of random effects is
again via empirical Bayes, with associated standard errors
obtained by the delta method.
Short, M., Carlin, B.P., and Bushhouse, S. (2002),
``Using hierarchical spatial models for cancer control planning in
Minnesota (United States),''
Cancer Causes and Control, 13, 903--916.
-
scb.txt, a (rather lengthy) WinBUGS program
to obtain the smoothed maps in the Short, Carlin, and Bushhouse paper
(to appear, Cancer Causes and Control).
Note that both "prevention" (Figure 3 in the paper) and
"outcome" (Figure 5 in the paper) foci are handled by this code: see
the definitions of the appropriate weights in the data section.
-
poly.S, an S program to extract polygons for
any state in the US. You will need this
code to get the Minnesota county boundaries into GeoBUGS, so that
you can then draw the smoothed cancer control maps in this package.
(An alternative is to draw them in ArcView or some other GIS.)
Finally, here are some programs for performing spatial frailty analysis in the
GeoBUGS software package:
-
WeibullSpatFrailty.txt, a GeoBUGS program
for fitting a spatial survival model using CAR spatial frailties with
a parametric (Weibull) baseline hazard.
You can also see the
short version of this program, which contains just the code
and an abbreviated data file.
-
CoxSpatFrailty.txt, a GeoBUGS program
for fitting a spatial survival model using CAR spatial frailties with
a semiparametric (Cox) baseline hazard.
You can also see the
short version of this program, which contains just the code
and an abbreviated data file.
Back to
Brad Carlin's home page
Brad Carlin
(brad@biostat.umn.edu)