Brad Carlin's Software Page
Also of potential interest is
spBayes,
a new R package for the analysis of pointlevel (geostatistical)
spatial hierarchical models. The package currently handles
normal observations in both univariate and multivariate settings;
spatiotemporal and nonnormal (e.g., logistic) models are on the way!

SPBayesModel.zip is a zip file
containing the BUGS and R code to fit the models in this paper above
and produce the paper's analyses of the dialysis patient heart stent
data in Figure 1 and Table 2.
These programs were written by Mr. Tom Murray during 2013

QBC Code.zip is a zip file
containing the BUGS and R code to fit the models in this paper above.
These programs were written by Mr. Harrison Quick during 2012

JingZhangCTpaperCode.rar is a rar file
containing the BUGS and R code to fit the models in this paper above
and produce the paper's summaries for its analyses of the real and
artificial data sets.
These programs were written by Ms. Jing Zhang during 2013.

Tom_Paper1.zip is a zip file
containing the code to fit the models in this paper above and produce
the paper's 5 tables. A "readme" text file is also included.
These programs were written by Mr. Tom Murray during 2012.

OA_BUGScode_upload.zip is a zip file
containing the code to fit the models in this paper above
to the osteoarthritis (OA) dataset described in the paper.
These programs were written by Ms. Hwanhee Hong during 2012.

20120106_HBHC_JASA_supplement.zip is a zip file
containing the code to fit the model in this paper to
an artificial dataset designed to resemble the actual
(Eli Lilly and Co.) dataset analyzed in the paper.
Start by reading the instructions in the pdf file.
These programs were written by Dr. Laura Hatfield during 200911.
Zhong, W., Carlin, B.P., and Koopmeiners, J.S. (2011),
``Flexible link continual reassessment methods for trivariate binary
outcome phase I/II trials,"
Research Report 2011031, Division of Biostatistics, University of
Minnesota.
Submitted to the Journal of Statistical Theory and Practice.

ZCKSoftware.zip is a zip file
containing the code to simulate the operating characteristics
of the adaptive Bayesian design; specifically, the code produces
Tables 2 and 4 in the above paper. Start by reading
the file "ProgramsDesciption.txt"; the main R program is "Eval_OC.R".
These programs were written by Mr. Wei Zhong during 2011.

COMING SOON: rssc.zip is a zip
archive containing
program to obtain the adjusted R^2's in Table 5 in the paper!
These programs were written by Ms. Lindsay Renfro during 200910.

COMING SOON: HCMS.txt is a BUGS
program to fit the commensurate prior model to the Saltz data,
obtaining Table 2 in the paper; supporting file
HCMS.data.txt
contains all data and initial values.
These programs were written by Mr. Brian Hobbs during 200910

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 20067
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 nonequivalence 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
(SHAREDG and SHAREDC), and generalized multivariate CAR (GMCAR)
models described in the paper above.

SEER_dat.odc gives the
Minnesota countylevel threecancer 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 zipcode 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 countylevel 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
carlinbetawombling.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/Splus
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
Splus.

dfcallbugs.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
simplepoissonmodel.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 fivedimensional 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.
WARNING: This code ignores the timevarying aspect of the
survival portion of the model, and must thus be considered
approximate!

ModelXII_Menk.txt,
a WinBUGS 1.4 program written by Mr. Jeremiah Menk for a class project
(joint with Ms. Emily Zabor and Ms. Anne Eaton), Spring 2010,
to fit "Model XII" with the correct timevarying aspect
using the "zeros trick" in WinBUGS;
results here.

ModelXII_Sweeting.txt,
a WinBUGS 1.4 program written by Dr. Michael Sweeting, 7/12/10,
also used to correctly fit "Model XII" with the timevarying aspect,
this time using the "ones trick" in WinBUGS;
results here
are broadly similar to those obtained using the Menk code!

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.
WARNING: This code also ignores the timevarying aspect of the
model, and so is in principle similar to the original Model XII
WinBUGS code above.
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, 903916.

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*at*biostat*dot*umn*dot*edu)